CernVM-FS
2.12.0
|
#include <telemetry_aggregator_influx.h>
Public Member Functions | |
TelemetryAggregatorInflux (Statistics *statistics, int send_rate_sec, OptionsManager *options_mgr, const std::string &fqrn) | |
virtual | ~TelemetryAggregatorInflux () |
Private Member Functions | |
FRIEND_TEST (T_TelemetryAggregator, EmptyCounters) | |
FRIEND_TEST (T_TelemetryAggregator, FailCreate) | |
FRIEND_TEST (T_TelemetryAggregator, ExtraFields_Tags) | |
FRIEND_TEST (T_TelemetryAggregator, UpdateCounters_WithExtraFields_Tags) | |
std::string | MakePayload () |
std::string | MakeDeltaPayload () |
TelemetryReturn | OpenSocket () |
TelemetryReturn | SendToInflux (const std::string &payload) |
virtual void | PushMetrics () |
Private Member Functions inherited from perf::TelemetryAggregator | |
virtual | ~TelemetryAggregator () |
void | Spawn () |
TelemetryAggregator (Statistics *statistics, int send_rate_sec, const std::string &fqrn) | |
Private Attributes | |
std::map< std::string, int64_t > | old_counters_ |
std::string | influx_host_ |
int | influx_port_ |
std::string | influx_metric_name_ |
std::string | influx_extra_fields_ |
std::string | influx_extra_tags_ |
int | socket_fd_ |
struct addrinfo * | res_ |
Private Attributes inherited from perf::TelemetryAggregator | |
Statistics * | statistics_ |
const int | send_rate_sec_ |
int | pipe_terminate_ [2] |
pthread_t | thread_telemetry_ |
std::string | fqrn_ |
bool | is_zombie_ |
uint64_t | timestamp_ |
std::map< std::string, int64_t > | counters_ |
Additional Inherited Members | |
Static Private Member Functions inherited from perf::TelemetryAggregator | |
static TelemetryAggregator * | Create (Statistics *statistics, int send_rate, OptionsManager *options_mgr, const std::string &fqrn, const TelemetrySelector type) |
static void * | MainTelemetry (void *data) |
Definition at line 25 of file telemetry_aggregator_influx.h.
perf::TelemetryAggregatorInflux::TelemetryAggregatorInflux | ( | Statistics * | statistics, |
int | send_rate_sec, | ||
OptionsManager * | options_mgr, | ||
const std::string & | fqrn | ||
) |
Definition at line 24 of file telemetry_aggregator_influx.cc.
|
virtual |
Definition at line 91 of file telemetry_aggregator_influx.cc.
|
private |
|
private |
|
private |
|
private |
|
private |
Creates a string in the influx data format containing the delta between 2 measurements of the same counter. Counters are only included if their absolute value is > 0 (delta can be 0).
NOTE: As influx_extra_fields_ are static, they are excluded of this delta format
Influx dataformat ( https://docs.influxdata.com/influxdb/cloud/reference/syntax/line-protocol/ ) Syntax <measurement>[,<tag_key>=<tag_value>[,<tag_key>=<tag_value>]] <field_key>=<field_value>[,<field_key>=<field_value>] [<timestamp>]
Example myMeasurement,tag1=value1,tag2=value2 fieldKey="fieldValue" 1556813561098000000
Definition at line 166 of file telemetry_aggregator_influx.cc.
Referenced by PushMetrics().
|
private |
Creates a string in the influx data format containing the absolute values of the counters. Counters are only included if their absolute value is > 0.
Influx dataformat ( https://docs.influxdata.com/influxdb/cloud/reference/syntax/line-protocol/ ) Syntax <measurement>[,<tag_key>=<tag_value>[,<tag_key>=<tag_value>]] <field_key>=<field_value>[,<field_key>=<field_value>] [<timestamp>]
Example myMeasurement,tag1=value1,tag2=value2 fieldKey="fieldValue" 1556813561098000000
Definition at line 112 of file telemetry_aggregator_influx.cc.
Referenced by PushMetrics().
|
private |
Definition at line 199 of file telemetry_aggregator_influx.cc.
Referenced by TelemetryAggregatorInflux().
|
privatevirtual |
PushMetrics is called after the snapshot of the counters. It should perform all manipulations needed for the counters and the sending/storing of the counters.
Needs to be implemented in the custom telemetry class.
Implements perf::TelemetryAggregator.
Definition at line 256 of file telemetry_aggregator_influx.cc.
|
private |
Definition at line 227 of file telemetry_aggregator_influx.cc.
Referenced by PushMetrics().
|
private |
Definition at line 43 of file telemetry_aggregator_influx.h.
Referenced by MakePayload(), and TelemetryAggregatorInflux().
|
private |
Definition at line 44 of file telemetry_aggregator_influx.h.
Referenced by MakeDeltaPayload(), MakePayload(), and TelemetryAggregatorInflux().
|
private |
Definition at line 40 of file telemetry_aggregator_influx.h.
Referenced by OpenSocket(), and TelemetryAggregatorInflux().
|
private |
Definition at line 42 of file telemetry_aggregator_influx.h.
Referenced by MakeDeltaPayload(), MakePayload(), and TelemetryAggregatorInflux().
|
private |
Definition at line 41 of file telemetry_aggregator_influx.h.
Referenced by SendToInflux(), and TelemetryAggregatorInflux().
|
private |
Definition at line 39 of file telemetry_aggregator_influx.h.
Referenced by MakeDeltaPayload(), and PushMetrics().
|
private |
Definition at line 46 of file telemetry_aggregator_influx.h.
Referenced by OpenSocket(), SendToInflux(), and ~TelemetryAggregatorInflux().
|
private |
Definition at line 45 of file telemetry_aggregator_influx.h.
Referenced by OpenSocket(), SendToInflux(), and ~TelemetryAggregatorInflux().