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