16 #ifndef ALICEO2_MONITORING_BACKENDS_INFLUXDB_H 17 #define ALICEO2_MONITORING_BACKENDS_INFLUXDB_H 20 #include "../Transports/TransportInterface.h" 21 #include "../MonLogger.h" 42 InfluxDB(std::unique_ptr<transports::TransportInterface> transport);
50 inline unsigned long convertTimestamp(
const std::chrono::time_point<std::chrono::system_clock>& timestamp);
58 void send(std::vector<Metric>&& metrics)
override;
63 void addGlobalTag(std::string_view name, std::string_view value)
override;
70 std::unique_ptr<transports::TransportInterface> mTransport;
75 void escape(std::string& escaped);
82 #endif // ALICEO2_MONITORING_BACKENDS_INFLUXDB_H ~InfluxDB()=default
Default destructor.
void addGlobalTag(std::string_view name, std::string_view value) override
Definition: InfluxDB.cxx:114
unsigned long convertTimestamp(const std::chrono::time_point< std::chrono::system_clock > ×tamp)
Definition: InfluxDB.cxx:45
std::string toInfluxLineProtocol(const Metric &metric)
Definition: InfluxDB.cxx:84
Backend pure virtual interface.
Definition: Backend.h:33
Backend that sends metrics to InfluxDB time-series databse.
Definition: InfluxDB.h:37
Represents a metric including value, type of the value, name, timestamp and tags. ...
Definition: Metric.h:37
InfluxDB(std::unique_ptr< transports::TransportInterface > transport)
Definition: InfluxDB.cxx:39
void send(const Metric &metric) override
Definition: InfluxDB.cxx:76