]> granicus.if.org Git - icinga2/blob - lib/perfdata/perfdatawriter.ti
Merge pull request #7527 from Icinga/bugfix/checkable-command-endpoint-zone
[icinga2] / lib / perfdata / perfdatawriter.ti
1 /* Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+ */
2
3 #include "base/configobject.hpp"
4 #include "base/application.hpp"
5
6 library perfdata;
7
8 namespace icinga
9 {
10
11 class PerfdataWriter : ConfigObject
12 {
13         activation_priority 100;
14
15         [config] String host_perfdata_path {
16                 default {{{ return Configuration::SpoolDir + "/perfdata/host-perfdata"; }}}
17         };
18         [config] String service_perfdata_path {
19                 default {{{ return Configuration::SpoolDir + "/perfdata/service-perfdata"; }}}
20         };
21         [config] String host_temp_path {
22                 default {{{ return Configuration::SpoolDir + "/tmp/host-perfdata"; }}}
23         };
24         [config] String service_temp_path {
25                 default {{{ return Configuration::SpoolDir + "/tmp/service-perfdata"; }}}
26         };
27         [config] String host_format_template {
28                 default {{{
29                         return "DATATYPE::HOSTPERFDATA\t"
30                                 "TIMET::$host.last_check$\t"
31                                 "HOSTNAME::$host.name$\t"
32                                 "HOSTPERFDATA::$host.perfdata$\t"
33                                 "HOSTCHECKCOMMAND::$host.check_command$\t"
34                                 "HOSTSTATE::$host.state$\t"
35                                 "HOSTSTATETYPE::$host.state_type$";
36                 }}}
37         };
38         [config] String service_format_template {
39                 default {{{
40                         return "DATATYPE::SERVICEPERFDATA\t"
41                                 "TIMET::$service.last_check$\t"
42                                 "HOSTNAME::$host.name$\t"
43                                 "SERVICEDESC::$service.name$\t"
44                                 "SERVICEPERFDATA::$service.perfdata$\t"
45                                 "SERVICECHECKCOMMAND::$service.check_command$\t"
46                                 "HOSTSTATE::$host.state$\t"
47                                 "HOSTSTATETYPE::$host.state_type$\t"
48                                 "SERVICESTATE::$service.state$\t"
49                                 "SERVICESTATETYPE::$service.state_type$";
50                 }}}
51         };
52
53         [config] double rotation_interval {
54                 default {{{ return 30; }}}
55         };
56         [config] bool enable_ha {
57                 default {{{ return false; }}}
58         };
59 };
60
61 }