summaryrefslogtreecommitdiffstats
path: root/lib/perfdata/influxdbwriter.hpp
blob: 48676cc97fbe13b2309832401995008ce8b86173 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/* Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+ */

#ifndef INFLUXDBWRITER_H
#define INFLUXDBWRITER_H

#include "perfdata/influxdbwriter-ti.hpp"

namespace icinga
{

/**
 * An Icinga InfluxDB v1 writer.
 *
 * @ingroup perfdata
 */
class InfluxdbWriter final : public ObjectImpl<InfluxdbWriter>
{
public:
	DECLARE_OBJECT(InfluxdbWriter);
	DECLARE_OBJECTNAME(InfluxdbWriter);

	static void StatsFunc(const Dictionary::Ptr& status, const Array::Ptr& perfdata);

protected:
	boost::beast::http::request<boost::beast::http::string_body> AssembleRequest(String body) override;
	Url::Ptr AssembleUrl() override;
};

}

#endif /* INFLUXDBWRITER_H */