icinga2/components/perfdata/perfdatawriter.ti

53 lines
1.5 KiB
Plaintext

#include "base/dynamicobject.h"
#include "base/application.h"
namespace icinga
{
class PerfdataWriter : DynamicObject
{
[config] String host_perfdata_path {
default {{{ return Application::GetLocalStateDir() + "/spool/icinga2/perfdata/host-perfdata"; }}}
};
[config] String service_perfdata_path {
default {{{ return Application::GetLocalStateDir() + "/spool/icinga2/perfdata/service-perfdata"; }}}
};
[config] String host_temp_path {
default {{{ return Application::GetLocalStateDir() + "/spool/icinga2/tmp/host-perfdata"; }}}
};
[config] String service_temp_path {
default {{{ return Application::GetLocalStateDir() + "/spool/icinga2/tmp/service-perfdata"; }}}
};
[config] String host_format_template {
default {{{
return "DATATYPE::HOSTPERFDATA\t"
"TIMET::$icinga.timet$\t"
"HOSTNAME::$host.name$\t"
"HOSTPERFDATA::$host.perfdata$\t"
"HOSTCHECKCOMMAND::$host.check_command$\t"
"HOSTSTATE::$host.state$\t"
"HOSTSTATETYPE::$host.state_type$";
}}}
};
[config] String service_format_template {
default {{{
return "DATATYPE::SERVICEPERFDATA\t"
"TIMET::$icinga.timet$\t"
"HOSTNAME::$host.name$\t"
"SERVICEDESC::$service.name$\t"
"SERVICEPERFDATA::$service.perfdata$\t"
"SERVICECHECKCOMMAND::$service.check_command$\t"
"HOSTSTATE::$host.state$\t"
"HOSTSTATETYPE::$host.state_type$\t"
"SERVICESTATE::$service.state$\t"
"SERVICESTATETYPE::$service.state_type$";
}}}
};
[config] double rotation_interval {
default {{{ return 30; }}}
};
};
}