2019-02-25 14:48:22 +01:00
|
|
|
/* Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+ */
|
2016-04-19 13:54:41 +02:00
|
|
|
|
|
|
|
#ifndef INFLUXDBWRITER_H
|
|
|
|
#define INFLUXDBWRITER_H
|
|
|
|
|
2018-01-18 13:50:38 +01:00
|
|
|
#include "perfdata/influxdbwriter-ti.hpp"
|
2016-04-19 13:54:41 +02:00
|
|
|
|
|
|
|
namespace icinga
|
|
|
|
{
|
|
|
|
|
|
|
|
/**
|
2021-04-14 18:52:36 +02:00
|
|
|
* An Icinga InfluxDB v1 writer.
|
2016-04-19 13:54:41 +02:00
|
|
|
*
|
|
|
|
* @ingroup perfdata
|
|
|
|
*/
|
2018-01-04 06:11:04 +01:00
|
|
|
class InfluxdbWriter final : public ObjectImpl<InfluxdbWriter>
|
2016-04-19 13:54:41 +02:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
DECLARE_OBJECT(InfluxdbWriter);
|
|
|
|
DECLARE_OBJECTNAME(InfluxdbWriter);
|
|
|
|
|
|
|
|
static void StatsFunc(const Dictionary::Ptr& status, const Array::Ptr& perfdata);
|
|
|
|
|
|
|
|
protected:
|
2021-04-14 18:52:36 +02:00
|
|
|
boost::beast::http::request<boost::beast::http::string_body> AssembleRequest(String body) override;
|
|
|
|
Url::Ptr AssembleUrl() override;
|
2016-04-19 13:54:41 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif /* INFLUXDBWRITER_H */
|