#include <TelnetStats.hpp>
Public Member Functions | |
TelnetStats (const std::shared_ptr< prometheus::Registry > ®, uint16_t portNumber, const std::string &prependName="") | |
void | consumeStats (const TelnetSessionStats &stat, bool sessionClosed) |
void | consumeStats (const TelnetServerStats &stat) |
Private Attributes | |
prometheus::Family< prometheus::Info > * | _infoFamily |
Information metric family. | |
prometheus::Gauge * | _activeConnection |
Number of active connections. | |
prometheus::Counter * | _refusedConnection |
Number of refused connections. | |
prometheus::Counter * | _totalConnection |
Number of total received connections. | |
prometheus::Counter * | _totalUploadBytes |
Total uploaded bytes. | |
prometheus::Counter * | _totalDownloadBytes |
Total downloaded bytes. | |
prometheus::Summary * | _sessionDuration |
Value of the duration of sessions. | |
prometheus::Gauge * | _maxSessionDuration |
Maximum duration of sessions. | |
prometheus::Gauge * | _minSessionDuration |
Minimum duration of sessions. | |
Additional Inherited Members | |
Private Member Functions inherited from BaseServerStats | |
void | initBaseStats (const std::shared_ptr< prometheus::Registry > ®, const std::string &name) |
void | consumeBaseStats (uint64_t succeeded, uint64_t failed, double processingTime) |
Prometheus statistics for Telnet server
Definition at line 33 of file TelnetStats.hpp.
TelnetStats::TelnetStats | ( | const std::shared_ptr< prometheus::Registry > & | reg, |
uint16_t | portNumber, | ||
const std::string & | prependName = "" ) |
Construct a new Telnet statistics
[in] | reg | Prometheus registry |
[in] | portNumber | Telnet server port |
[in] | prependName | Prefix for Prometheus stats |
Definition at line 11 of file TelnetStats.cpp.
void TelnetStats::consumeStats | ( | const TelnetServerStats & | stat | ) |
Updates statistics with server values
[in] | stat | Statistics values from server |
Definition at line 105 of file TelnetStats.cpp.
void TelnetStats::consumeStats | ( | const TelnetSessionStats & | stat, |
bool | sessionClosed ) |
Updates statistics with session values
[in] | stat | Statistics values from session |
[in] | sessionClosed | True if the provided session is closed |
Definition at line 81 of file TelnetStats.cpp.
|
private |
Number of active connections.
Definition at line 36 of file TelnetStats.hpp.
|
private |
Information metric family.
Definition at line 35 of file TelnetStats.hpp.
|
private |
Maximum duration of sessions.
Definition at line 42 of file TelnetStats.hpp.
|
private |
Minimum duration of sessions.
Definition at line 43 of file TelnetStats.hpp.
|
private |
Number of refused connections.
Definition at line 37 of file TelnetStats.hpp.
|
private |
Value of the duration of sessions.
Definition at line 41 of file TelnetStats.hpp.
|
private |
Number of total received connections.
Definition at line 38 of file TelnetStats.hpp.
|
private |
Total downloaded bytes.
Definition at line 40 of file TelnetStats.hpp.
|
private |
Total uploaded bytes.
Definition at line 39 of file TelnetStats.hpp.