#include <telemetry_aggregator_influx.h>
perf::TelemetryAggregatorInflux::TelemetryAggregatorInflux |
( |
Statistics * |
statistics, |
|
|
int |
send_rate_sec, |
|
|
OptionsManager * |
options_mgr, |
|
|
MountPoint * |
mount_point, |
|
|
const std::string & |
fqrn |
|
) |
| |
perf::TelemetryAggregatorInflux::~TelemetryAggregatorInflux |
( |
| ) |
|
|
virtual |
perf::TelemetryAggregatorInflux::FRIEND_TEST |
( |
T_TelemetryAggregator |
, |
|
|
EmptyCounters |
|
|
) |
| |
|
private |
perf::TelemetryAggregatorInflux::FRIEND_TEST |
( |
T_TelemetryAggregator |
, |
|
|
FailCreate |
|
|
) |
| |
|
private |
perf::TelemetryAggregatorInflux::FRIEND_TEST |
( |
T_TelemetryAggregator |
, |
|
|
ExtraFields_Tags |
|
|
) |
| |
|
private |
perf::TelemetryAggregatorInflux::FRIEND_TEST |
( |
T_TelemetryAggregator |
, |
|
|
UpdateCounters_WithExtraFields_Tags |
|
|
) |
| |
|
private |
std::string perf::TelemetryAggregatorInflux::MakeDeltaPayload |
( |
| ) |
|
|
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 168 of file telemetry_aggregator_influx.cc.
Referenced by PushMetrics().
std::string perf::TelemetryAggregatorInflux::MakePayload |
( |
| ) |
|
|
private |
void perf::TelemetryAggregatorInflux::PushMetrics |
( |
| ) |
|
|
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 263 of file telemetry_aggregator_influx.cc.
TelemetryReturn perf::TelemetryAggregatorInflux::SendToInflux |
( |
const std::string & |
payload | ) |
|
|
private |
std::string perf::TelemetryAggregatorInflux::influx_extra_fields_ |
|
private |
std::string perf::TelemetryAggregatorInflux::influx_extra_tags_ |
|
private |
std::string perf::TelemetryAggregatorInflux::influx_host_ |
|
private |
std::string perf::TelemetryAggregatorInflux::influx_metric_name_ |
|
private |
int perf::TelemetryAggregatorInflux::influx_port_ |
|
private |
std::map<std::string, int64_t> perf::TelemetryAggregatorInflux::old_counters_ |
|
private |
struct addrinfo* perf::TelemetryAggregatorInflux::res_ |
|
private |
int perf::TelemetryAggregatorInflux::socket_fd_ |
|
private |
The documentation for this class was generated from the following files: