1 /* Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+ */
3 #include "base/configobject.hpp"
10 class InfluxdbWriter : ConfigObject
12 activation_priority 100;
14 [config, required] String host {
15 default {{{ return "127.0.0.1"; }}}
17 [config, required] String port {
18 default {{{ return "8086"; }}}
20 [config, required] String database {
21 default {{{ return "icinga2"; }}}
23 [config] String username {
24 default {{{ return ""; }}}
26 [config, no_user_view] String password {
27 default {{{ return ""; }}}
29 [config] bool ssl_enable {
30 default {{{ return false; }}}
32 [config] String ssl_ca_cert {
33 default {{{ return ""; }}}
35 [config] String ssl_cert {
36 default {{{ return ""; }}}
38 [config] String ssl_key{
39 default {{{ return ""; }}}
41 [config, required] Dictionary::Ptr host_template {
43 return new Dictionary({
44 { "measurement", "$host.check_command$" },
45 { "tags", new Dictionary({
46 { "hostname", "$host.name$" }
51 [config, required] Dictionary::Ptr service_template {
53 return new Dictionary({
54 { "measurement", "$service.check_command$" },
55 { "tags", new Dictionary({
56 { "hostname", "$host.name$" },
57 { "service", "$service.name$" }
62 [config] bool enable_send_thresholds {
63 default {{{ return false; }}}
65 [config] bool enable_send_metadata {
66 default {{{ return false; }}}
68 [config] int flush_interval {
69 default {{{ return 10; }}}
71 [config] int flush_threshold {
72 default {{{ return 1024; }}}
74 [config] bool enable_ha {
75 default {{{ return false; }}}
79 validator InfluxdbWriter {
80 Dictionary host_template {
87 Dictionary service_template {