mirror of https://github.com/Icinga/icinga2.git
parent
aba4f1a0d5
commit
f13e7b5fa0
|
@ -22,25 +22,25 @@ class PerfdataWriter : DynamicObject
|
|||
default {{{
|
||||
return "DATATYPE::HOSTPERFDATA\t"
|
||||
"TIMET::$icinga.timet$\t"
|
||||
"HOSTNAME::$HOSTNAME$\t"
|
||||
"HOSTPERFDATA::$HOSTPERFDATA$\t"
|
||||
"HOSTCHECKCOMMAND::$HOSTCHECKCOMMAND$\t"
|
||||
"HOSTSTATE::$HOSTSTATE$\t"
|
||||
"HOSTSTATETYPE::$HOSTSTATETYPE$";
|
||||
"HOSTNAME::$host.name$\t"
|
||||
"HOSTPERFDATA::$host.perfdata$\t"
|
||||
"HOSTCHECKCOMMAND::$host.checkcommand$\t"
|
||||
"HOSTSTATE::$host.state$\t"
|
||||
"HOSTSTATETYPE::$host.statetype$";
|
||||
}}}
|
||||
};
|
||||
[config] String service_format_template {
|
||||
default {{{
|
||||
return "DATATYPE::SERVICEPERFDATA\t"
|
||||
"TIMET::$icinga.timet$\t"
|
||||
"HOSTNAME::$HOSTNAME$\t"
|
||||
"SERVICEDESC::$SERVICEDESC$\t"
|
||||
"SERVICEPERFDATA::$SERVICEPERFDATA$\t"
|
||||
"SERVICECHECKCOMMAND::$SERVICECHECKCOMMAND$\t"
|
||||
"HOSTSTATE::$HOSTSTATE$\t"
|
||||
"HOSTSTATETYPE::$HOSTSTATETYPE$\t"
|
||||
"SERVICESTATE::$SERVICESTATE$\t"
|
||||
"SERVICESTATETYPE::$SERVICESTATETYPE$";
|
||||
"HOSTNAME::$host.name$\t"
|
||||
"SERVICEDESC::$service.description$\t"
|
||||
"SERVICEPERFDATA::$service.perfdata$\t"
|
||||
"SERVICECHECKCOMMAND::$service.checkcommand$\t"
|
||||
"HOSTSTATE::$host.state$\t"
|
||||
"HOSTSTATETYPE::$host.statetype$\t"
|
||||
"SERVICESTATE::$service.state$\t"
|
||||
"SERVICESTATETYPE::$service.statetype$";
|
||||
}}}
|
||||
};
|
||||
|
||||
|
|
|
@ -182,8 +182,8 @@ information in the check output (`-o`).
|
|||
|
||||
command = [
|
||||
PluginDir + "/process_check_result",
|
||||
"-H", "$HOSTNAME$",
|
||||
"-S", "$SERVICEDESC$",
|
||||
"-H", "$host.name$",
|
||||
"-S", "$service.description$",
|
||||
"-c", "/var/run/icinga2/cmd/icinga2.cmd",
|
||||
"-r", "0",
|
||||
"-o", "Event Handler triggered in state '$SERVICESTATE$' with output '$SERVICEOUTPUT$'."
|
||||
|
|
|
@ -25,8 +25,8 @@ Therefore the Icinga 2 `PerfdataWriter` object allows you to define
|
|||
the output template format for host and services backed with Icinga 2
|
||||
runtime vars.
|
||||
|
||||
host_format_template = "DATATYPE::HOSTPERFDATA\tTIMET::$TIMET$\tHOSTNAME::$HOSTNAME$\tHOSTPERFDATA::$HOSTPERFDATA$\tHOSTCHECKCOMMAND::$HOSTCHECKCOMMAND$\tHOSTSTATE::$HOSTSTATE$\tHOSTSTATETYPE::$HOSTSTATETYPE$"
|
||||
service_format_template = "DATATYPE::SERVICEPERFDATA\tTIMET::$TIMET$\tHOSTNAME::$HOSTNAME$\tSERVICEDESC::$SERVICEDESC$\tSERVICEPERFDATA::$SERVICEPERFDATA$\tSERVICECHECKCOMMAND::$SERVICECHECKCOMMAND$\tHOSTSTATE::$HOSTSTATE$\tHOSTSTATETYPE::$HOSTSTATETYPE$\tSERVICESTATE::$SERVICESTATE$\tSERVICESTATETYPE::$SERVICESTATETYPE$"
|
||||
host_format_template = "DATATYPE::HOSTPERFDATA\tTIMET::$icinga.timet$\tHOSTNAME::$host.name$\tHOSTPERFDATA::$host.perfdata$\tHOSTCHECKCOMMAND::$host.checkcommand$\tHOSTSTATE::$host.state$\tHOSTSTATETYPE::$host.statetype$"
|
||||
service_format_template = "DATATYPE::SERVICEPERFDATA\tTIMET::$icinga.timet$\tHOSTNAME::$host.name$\tSERVICEDESC::$service.description$\tSERVICEPERFDATA::$service.perfdata$\tSERVICECHECKCOMMAND::$service.checkcommand$\tHOSTSTATE::$host.state$\tHOSTSTATETYPE::$host.statetype$\tSERVICESTATE::$service.state$\tSERVICESTATETYPE::$service.statetype$"
|
||||
|
||||
The default templates are already provided with the Icinga 2 feature configuration
|
||||
which can be enabled using
|
||||
|
|
|
@ -520,9 +520,8 @@ Example:
|
|||
|
||||
service_perfdata_path = "/var/spool/icinga2/perfdata/service-perfdata"
|
||||
|
||||
host_format_template = "DATATYPE::HOSTPERFDATA\tTIMET::$TIMET$\tHOSTNAME::$HOSTNAME$\tHOSTPERFDATA::$HOSTPERFDATA$\tHOSTCHECKCOMMAND::$HOSTCHECKCOMMAND$\tHOSTSTATE::$HOSTSTATE$\tHOSTSTATETYPE::$HOSTSTATETYPE$"
|
||||
|
||||
service_format_template = "DATATYPE::SERVICEPERFDATA\tTIMET::$TIMET$\tHOSTNAME::$HOSTNAME$\tSERVICEDESC::$SERVICEDESC$\tSERVICEPERFDATA::$SERVICEPERFDATA$\tSERVICECHECKCOMMAND::$SERVICECHECKCOMMAND$\tHOSTSTATE::$HOSTSTATE$\tHOSTSTATETYPE::$HOSTSTATETYPE$\tSERVICESTATE::$SERVICESTATE$\tSERVICESTATETYPE::$SERVICESTATETYPE$"
|
||||
host_format_template = "DATATYPE::HOSTPERFDATA\tTIMET::$icinga.timet$\tHOSTNAME::$host.name$\tHOSTPERFDATA::$host.perfdata$\tHOSTCHECKCOMMAND::$host.checkcommand$\tHOSTSTATE::$host.state$\tHOSTSTATETYPE::$host.statetype$"
|
||||
service_format_template = "DATATYPE::SERVICEPERFDATA\tTIMET::$icinga.timet$\tHOSTNAME::$host.name$\tSERVICEDESC::$service.description$\tSERVICEPERFDATA::$service.perfdata$\tSERVICECHECKCOMMAND::$service.checkcommand$\tHOSTSTATE::$host.state$\tHOSTSTATETYPE::$host.statetype$\tSERVICESTATE::$service.state$\tSERVICESTATETYPE::$service.statetype$"
|
||||
|
||||
rotation_interval = 15s
|
||||
}
|
||||
|
|
|
@ -256,7 +256,7 @@ are separated from the command name using an exclamation mark (`!`).
|
|||
|
||||
define command {
|
||||
command_name ping4
|
||||
command_line $USER1$/check_ping -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$ -p 5
|
||||
command_line $USER1$/check_ping -H $address$ -w $ARG1$ -c $ARG2$ -p 5
|
||||
}
|
||||
|
||||
define service {
|
||||
|
@ -269,7 +269,7 @@ are separated from the command name using an exclamation mark (`!`).
|
|||
With the freely definable custom attributes in Icinga 2 it looks like this:
|
||||
|
||||
object CheckCommand "ping4" {
|
||||
command = PluginDir + "/check_ping -H $HOSTADDRESS$ -w $wrta$,$wpl%$ -c $crta$,$cpl%$"
|
||||
command = PluginDir + "/check_ping -H $address$ -w $wrta$,$wpl%$ -c $crta$,$cpl%$"
|
||||
}
|
||||
|
||||
object Service "PING" {
|
||||
|
|
|
@ -23,7 +23,7 @@ object CheckCommand "ping4" {
|
|||
command = [
|
||||
PluginDir + "/check_ping",
|
||||
"-4",
|
||||
"-H", "$HOSTADDRESS$",
|
||||
"-H", "$address$",
|
||||
"-w", "$wrta$,$wpl$%",
|
||||
"-c", "$crta$,$cpl$%",
|
||||
"-p", "$packets$",
|
||||
|
@ -44,7 +44,7 @@ object CheckCommand "ping6" {
|
|||
command = [
|
||||
PluginDir + "/check_ping",
|
||||
"-6",
|
||||
"-H", "$HOSTADDRESS6$",
|
||||
"-H", "$address6$",
|
||||
"-w", "$wrta$,$wpl$%",
|
||||
"-c", "$crta$,$cpl$%",
|
||||
"-p", "$packets$",
|
||||
|
@ -96,7 +96,7 @@ object CheckCommand "tcp" {
|
|||
|
||||
command = [
|
||||
PluginDir + "/check_tcp",
|
||||
"-H", "$HOSTADDRESS$",
|
||||
"-H", "$address$",
|
||||
"-p", "$port$"
|
||||
]
|
||||
}
|
||||
|
@ -106,7 +106,7 @@ object CheckCommand "udp" {
|
|||
|
||||
command = [
|
||||
PluginDir + "/check_udp",
|
||||
"-H", "$HOSTADDRESS$",
|
||||
"-H", "$address$",
|
||||
"-p", "$port$"
|
||||
]
|
||||
}
|
||||
|
@ -125,7 +125,7 @@ object CheckCommand "http_ip" {
|
|||
|
||||
command = [
|
||||
PluginDir + "/check_http",
|
||||
"-H", "$HOSTADDRESS$"
|
||||
"-H", "$address$"
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -143,7 +143,7 @@ object CheckCommand "https_ip" {
|
|||
|
||||
command = [
|
||||
PluginDir + "/check_http",
|
||||
"-I", "$HOSTADDRESS$", "-S"
|
||||
"-I", "$address$", "-S"
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -152,7 +152,7 @@ object CheckCommand "smtp" {
|
|||
|
||||
command = [
|
||||
PluginDir + "/check_smtp",
|
||||
"-H", "$HOSTADDRESS$"
|
||||
"-H", "$address$"
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -161,7 +161,7 @@ object CheckCommand "ssmtp" {
|
|||
|
||||
command = [
|
||||
PluginDir + "/check_ssmtp",
|
||||
"-H", "$HOSTADDRESS$",
|
||||
"-H", "$address$",
|
||||
"-p", "$port$"
|
||||
],
|
||||
|
||||
|
@ -173,7 +173,7 @@ object CheckCommand "ntp_time" {
|
|||
|
||||
command = [
|
||||
PluginDir + "/check_ntp_time",
|
||||
"-H", "$HOSTADDRESS$"
|
||||
"-H", "$address$"
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -182,7 +182,7 @@ object CheckCommand "ssh" {
|
|||
|
||||
command = [
|
||||
PluginDir + "/check_ssh",
|
||||
"$HOSTADDRESS$"
|
||||
"$address$"
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -248,7 +248,7 @@ object CheckCommand "snmp"{
|
|||
|
||||
command = [
|
||||
PluginDir + "/check_snmp",
|
||||
"-H", "$HOSTADDRESS$",
|
||||
"-H", "$address$",
|
||||
"-o", "$oid$",
|
||||
"-C", "$community$"
|
||||
],
|
||||
|
@ -277,7 +277,7 @@ object CheckCommand "snmp-extend"{
|
|||
|
||||
command = [
|
||||
IcingaSysconfDir + "/icinga2/scripts/snmp-extend.sh",
|
||||
"$HOSTADDRESS$",
|
||||
"$address$",
|
||||
"$community$",
|
||||
"$plugin$"
|
||||
],
|
||||
|
|
Loading…
Reference in New Issue