Fall back to using address6 when the address attribute is not set

fixes #8259
This commit is contained in:
Gunnar Beutner 2015-02-13 11:52:08 +01:00
parent 2cab6fbb9d
commit bb033b5ce3
4 changed files with 167 additions and 54 deletions

View File

@ -86,7 +86,7 @@ Custom Attributes:
Name | Description Name | Description
----------------|-------------- ----------------|--------------
by_ssh_address | **Optional.** The host's address. Defaults to "$address$". by_ssh_address | **Optional.** The host's address. Defaults to "$address$" or "$address6$" if the `address` attribute is not set.
by_ssh_port | **Optional.** The SSH port. Defaults to 22. by_ssh_port | **Optional.** The SSH port. Defaults to 22.
by_ssh_command | **Optional.** The command that should be executed. by_ssh_command | **Optional.** The command that should be executed.
by_ssh_logname | **Optional.** The SSH username. by_ssh_logname | **Optional.** The SSH username.
@ -237,12 +237,32 @@ Custom Attributes:
Name | Description Name | Description
-------------------|-------------- -------------------|--------------
ftp_address | **Optional.** The host's address. Defaults to "$address$". ftp_address | **Optional.** The host's address. Defaults to "$address$" or "$address6$" if the `address` attribute is not set.
### <a id="plugin-check-command-hostalive"></a> hostalive ### <a id="plugin-check-command-hostalive"></a> hostalive
Check command object for the `check_ping` plugin with host check default values. Check command object for the `check_ping` plugin with host check default values. This variant
uses the host's `address` attribute if available and falls back to using the `address6` attribute
if the `address` attribute is not set.
Custom Attributes:
Name | Description
----------------|--------------
ping_address | **Optional.** The host's address. Defaults to "$address$" or "$address6$" if the `address` attribute is not set.
ping_wrta | **Optional.** The RTA warning threshold in milliseconds. Defaults to 3000.
ping_wpl | **Optional.** The packet loss warning threshold in %. Defaults to 80.
ping_crta | **Optional.** The RTA critical threshold in milliseconds. Defaults to 5000.
ping_cpl | **Optional.** The packet loss critical threshold in %. Defaults to 100.
ping_packets | **Optional.** The number of packets to send. Defaults to 5.
ping_timeout | **Optional.** The plugin timeout in seconds. Defaults to 0 (no timeout).
### <a id="plugin-check-command-hostalive4"></a> hostalive4
Check command object for the `check_ping` plugin with host check default values. This variant
uses the host's `address` attribute.
Custom Attributes: Custom Attributes:
@ -257,6 +277,24 @@ ping_packets | **Optional.** The number of packets to send. Defaults to 5.
ping_timeout | **Optional.** The plugin timeout in seconds. Defaults to 0 (no timeout). ping_timeout | **Optional.** The plugin timeout in seconds. Defaults to 0 (no timeout).
### <a id="plugin-check-command-hostalive6"></a> hostalive6
Check command object for the `check_ping` plugin with host check default values. This variant
uses the host's `address6` attribute.
Custom Attributes:
Name | Description
----------------|--------------
ping_address | **Optional.** The host's IPv6 address. Defaults to "$address6$".
ping_wrta | **Optional.** The RTA warning threshold in milliseconds. Defaults to 3000.
ping_wpl | **Optional.** The packet loss warning threshold in %. Defaults to 80.
ping_crta | **Optional.** The RTA critical threshold in milliseconds. Defaults to 5000.
ping_cpl | **Optional.** The packet loss critical threshold in %. Defaults to 100.
ping_packets | **Optional.** The number of packets to send. Defaults to 5.
ping_timeout | **Optional.** The plugin timeout in seconds. Defaults to 0 (no timeout).
### <a id="plugin-check-command-hpjd"></a> hpjd ### <a id="plugin-check-command-hpjd"></a> hpjd
Check command object for the `check_hpjd` plugin. Check command object for the `check_hpjd` plugin.
@ -265,7 +303,7 @@ Custom Attributes:
Name | Description Name | Description
----------------|-------------- ----------------|--------------
hpjd_address | **Optional.** The host's address. Defaults to "$address$". hpjd_address | **Optional.** The host's address. Defaults to "$address$" or "$address6$" if the `address` attribute is not set.
hpjd_port | **Optional.** The host's SNMP port. Defaults to 161. hpjd_port | **Optional.** The host's SNMP port. Defaults to 161.
hpjd_community | **Optional.** The SNMP community. Defaults to "public". hpjd_community | **Optional.** The SNMP community. Defaults to "public".
@ -278,7 +316,7 @@ Custom Attributes:
Name | Description Name | Description
-------------------------|-------------- -------------------------|--------------
http_address | **Optional.** The host's address. Defaults to "$address". http_address | **Optional.** The host's address. Defaults to "$address$" or "$address6$" if the `address` attribute is not set.
http_vhost | **Optional.** The virtual host that should be sent in the "Host" header. http_vhost | **Optional.** The virtual host that should be sent in the "Host" header.
http_uri | **Optional.** The request URI. http_uri | **Optional.** The request URI.
http_port | **Optional.** The TCP port. Defaults to 80 when not using SSL, 443 otherwise. http_port | **Optional.** The TCP port. Defaults to 80 when not using SSL, 443 otherwise.
@ -341,7 +379,7 @@ Custom Attributes:
Name | Description Name | Description
----------------|-------------- ----------------|--------------
imap_address | **Optional.** The host's address. Defaults to "$address$". imap_address | **Optional.** The host's address. Defaults to "$address$" or "$address6$" if the `address` attribute is not set.
imap_port | **Optional.** The port that should be checked. Defaults to 143. imap_port | **Optional.** The port that should be checked. Defaults to 143.
@ -369,7 +407,7 @@ Custom Attributes:
Name | Description Name | Description
----------------|-------------- ----------------|--------------
nrpe_address | **Optional.** The host's address. Defaults to "$address$". nrpe_address | **Optional.** The host's address. Defaults to "$address$" or "$address6$" if the `address` attribute is not set.
nrpe_port | **Optional.** The NRPE port. Defaults to 5668. nrpe_port | **Optional.** The NRPE port. Defaults to 5668.
nrpe_command | **Optional.** The command that should be executed. nrpe_command | **Optional.** The command that should be executed.
nrpe_no_ssl | **Optional.** Whether to disable SSL or not. Defaults to `false`. nrpe_no_ssl | **Optional.** Whether to disable SSL or not. Defaults to `false`.
@ -386,7 +424,7 @@ Custom Attributes:
Name | Description Name | Description
----------------|-------------- ----------------|--------------
nscp_address | **Optional.** The host's address. Defaults to "$address$". nscp_address | **Optional.** The host's address. Defaults to "$address$" or "$address6$" if the `address` attribute is not set.
nscp_port | **Optional.** The NSClient++ port. Defaults to 12489. nscp_port | **Optional.** The NSClient++ port. Defaults to 12489.
nscp_password | **Optional.** The NSClient++ password. nscp_password | **Optional.** The NSClient++ password.
nscp_variable | **Required.** The variable that should be checked. nscp_variable | **Required.** The variable that should be checked.
@ -404,7 +442,7 @@ Custom Attributes:
Name | Description Name | Description
----------------|-------------- ----------------|--------------
ntp_address | **Optional.** The host's address. Defaults to "$address$". ntp_address | **Optional.** The host's address. Defaults to "$address$" or "$address6$" if the `address` attribute is not set.
### <a id="plugin-check-command-passive"></a> passive ### <a id="plugin-check-command-passive"></a> passive
@ -419,6 +457,25 @@ dummy_state | **Optional.** The state. Can be one of 0 (ok), 1 (warning), 2
dummy_text | **Optional.** Plugin output. Defaults to "No Passive Check Result Received.". dummy_text | **Optional.** Plugin output. Defaults to "No Passive Check Result Received.".
### <a id="plugin-check-command-ping"></a> ping
Check command object for the `check_ping` plugin. This command uses the host's `address` attribute
if available and falls back to using the `address6` attribute if the `address` attribute is not set.
Custom Attributes:
Name | Description
----------------|--------------
ping_address | **Optional.** The host's address. Defaults to "$address$" or "$address6$" if the `address` attribute is not set.
ping_wrta | **Optional.** The RTA warning threshold in milliseconds. Defaults to 100.
ping_wpl | **Optional.** The packet loss warning threshold in %. Defaults to 5.
ping_crta | **Optional.** The RTA critical threshold in milliseconds. Defaults to 200.
ping_cpl | **Optional.** The packet loss critical threshold in %. Defaults to 15.
ping_packets | **Optional.** The number of packets to send. Defaults to 5.
ping_timeout | **Optional.** The plugin timeout in seconds. Defaults to 0 (no timeout).
### <a id="plugin-check-command-ping4"></a> ping4 ### <a id="plugin-check-command-ping4"></a> ping4
Check command object for the `check_ping` plugin. Check command object for the `check_ping` plugin.
@ -460,7 +517,7 @@ Custom Attributes:
Name | Description Name | Description
----------------|-------------- ----------------|--------------
pop_address | **Optional.** The host's address. Defaults to "$address$". pop_address | **Optional.** The host's address. Defaults to "$address$" or "$address6$" if the `address` attribute is not set.
pop_port | **Optional.** The port that should be checked. Defaults to 110. pop_port | **Optional.** The port that should be checked. Defaults to 110.
@ -505,7 +562,7 @@ Custom Attributes:
Name | Description Name | Description
----------------|-------------- ----------------|--------------
simap_address | **Optional.** The host's address. Defaults to "$address$". simap_address | **Optional.** The host's address. Defaults to "$address$" or "$address6$" if the `address` attribute is not set.
simap_port | **Optional.** The host's port. simap_port | **Optional.** The host's port.
@ -517,7 +574,7 @@ Custom Attributes:
Name | Description Name | Description
---------------------|-------------- ---------------------|--------------
smtp_address | **Optional.** The host's address. Defaults to "$address$". smtp_address | **Optional.** The host's address. Defaults to "$address$" or "$address6$" if the `address` attribute is not set.
smtp_port | **Optional.** The port that should be checked. Defaults to 25. smtp_port | **Optional.** The port that should be checked. Defaults to 25.
smtp_mail_from | **Optional.** Test a MAIL FROM command with the given email address. smtp_mail_from | **Optional.** Test a MAIL FROM command with the given email address.
@ -530,7 +587,7 @@ Custom Attributes:
Name | Description Name | Description
--------------------|-------------- --------------------|--------------
snmp_address | **Optional.** The host's address. Defaults to "$address$". snmp_address | **Optional.** The host's address. Defaults to "$address$" or "$address6$" if the `address` attribute is not set.
snmp_oid | **Required.** The SNMP OID. snmp_oid | **Required.** The SNMP OID.
snmp_community | **Optional.** The SNMP community. Defaults to "public". snmp_community | **Optional.** The SNMP community. Defaults to "public".
snmp_warn | **Optional.** The warning threshold. snmp_warn | **Optional.** The warning threshold.
@ -551,7 +608,7 @@ Custom Attributes:
Name | Description Name | Description
------------------|-------------- ------------------|--------------
snmpv3_address | **Optional.** The host's address. Defaults to "$address$". snmpv3_address | **Optional.** The host's address. Defaults to "$address$" or "$address6$" if the `address` attribute is not set.
snmpv3_user | **Required.** The username to log in with. snmpv3_user | **Required.** The username to log in with.
snmpv3_auth_alg | **Optional.** The authentication algorithm. Defaults to SHA. snmpv3_auth_alg | **Optional.** The authentication algorithm. Defaults to SHA.
snmpv3_auth_key | **Required.** The authentication key. snmpv3_auth_key | **Required.** The authentication key.
@ -570,7 +627,7 @@ Custom Attributes:
Name | Description Name | Description
----------------|-------------- ----------------|--------------
snmp_address | **Optional.** The host's address. Defaults to "$address$". snmp_address | **Optional.** The host's address. Defaults to "$address$" or "$address6$" if the `address` attribute is not set.
snmp_oid | **Optional.** The SNMP OID. Defaults to "1.3.6.1.2.1.1.3.0". snmp_oid | **Optional.** The SNMP OID. Defaults to "1.3.6.1.2.1.1.3.0".
snmp_community | **Optional.** The SNMP community. Defaults to "public". snmp_community | **Optional.** The SNMP community. Defaults to "public".
@ -583,7 +640,7 @@ Custom Attributes:
Name | Description Name | Description
----------------|-------------- ----------------|--------------
spop_address | **Optional.** The host's address. Defaults to "$address$". spop_address | **Optional.** The host's address. Defaults to "$address$" or "$address6$" if the `address` attribute is not set.
spop_port | **Optional.** The host's port. spop_port | **Optional.** The host's port.
@ -595,7 +652,7 @@ Custom Attributes:
Name | Description Name | Description
----------------|-------------- ----------------|--------------
ssh_address | **Optional.** The host's address. Defaults to "$address$". ssh_address | **Optional.** The host's address. Defaults to "$address$" or "$address6$" if the `address` attribute is not set.
ssh_port | **Optional.** The port that should be checked. Defaults to 22. ssh_port | **Optional.** The port that should be checked. Defaults to 22.
ssh_timeout | **Optional.** Seconds before connection times out. Defaults to 10. ssh_timeout | **Optional.** Seconds before connection times out. Defaults to 10.
@ -608,7 +665,7 @@ Custom Attributes:
Name | Description Name | Description
------------------------------|-------------- ------------------------------|--------------
ssl_address | **Optional.** The host's address. Defaults to "$address$". ssl_address | **Optional.** The host's address. Defaults to "$address$" or "$address6$" if the `address` attribute is not set.
ssl_port | **Required.** The port that should be checked. ssl_port | **Required.** The port that should be checked.
ssl_timeout | **Optional.** Timeout in seconds for the connect and handshake. The plugin default is 10 seconds. ssl_timeout | **Optional.** Timeout in seconds for the connect and handshake. The plugin default is 10 seconds.
ssl_cert_valid_days_warn | **Optional.** Warning threshold for days before the certificate will expire. When used, ssl_cert_valid_days_critical must also be set. ssl_cert_valid_days_warn | **Optional.** Warning threshold for days before the certificate will expire. When used, ssl_cert_valid_days_critical must also be set.
@ -623,7 +680,7 @@ Custom Attributes:
Name | Description Name | Description
----------------|-------------- ----------------|--------------
ssmtp_address | **Required.** The host's address. Defaults to "$address$". ssmtp_address | **Required.** The host's address. Defaults to "$address$" or "$address6$" if the `address` attribute is not set.
ssmtp_port | **Optional.** The port that should be checked. Defaults to 465. ssmtp_port | **Optional.** The port that should be checked. Defaults to 465.
@ -647,7 +704,7 @@ Custom Attributes:
Name | Description Name | Description
----------------|-------------- ----------------|--------------
tcp_address | **Optional.** The host's address. Defaults to "$address$". tcp_address | **Optional.** The host's address. Defaults to "$address$" or "$address6$" if the `address` attribute is not set.
tcp_port | **Required.** The port that should be checked. tcp_port | **Required.** The port that should be checked.
@ -659,7 +716,7 @@ Custom Attributes:
Name | Description Name | Description
----------------|-------------- ----------------|--------------
udp_address | **Optional.** The host's address. Defaults to "$address$". udp_address | **Optional.** The host's address. Defaults to "$address$" or "$address6$" if the `address` attribute is not set.
udp_port | **Required.** The port that should be checked. udp_port | **Required.** The port that should be checked.
@ -671,7 +728,7 @@ Custom Attributes:
Name | Description Name | Description
----------------|-------------- ----------------|--------------
ups_address | **Optional.** The host's address. Defaults to "$address$". ups_address | **Optional.** The host's address. Defaults to "$address$" or "$address6$" if the `address` attribute is not set.
ups_name | **Optional.** The UPS name. Defaults to `ups`. ups_name | **Optional.** The UPS name. Defaults to `ups`.
@ -737,7 +794,7 @@ Custom Attributes:
Name | Description Name | Description
------------------------|-------------- ------------------------|--------------
snmp_address | **Optional.** The host's address. Defaults to "$address$". snmp_address | **Optional.** The host's address. Defaults to "$address$" or "$address6$" if the `address` attribute is not set.
snmp_nocrypt | **Optional.** Define SNMP encryption. If set **snmp_v3** needs to be set. Defaults to "false". snmp_nocrypt | **Optional.** Define SNMP encryption. If set **snmp_v3** needs to be set. Defaults to "false".
snmp_community | **Optional.** The SNMP community. Defaults to "public". snmp_community | **Optional.** The SNMP community. Defaults to "public".
snmp_port | **Optional.** The SNMP port connection. snmp_port | **Optional.** The SNMP port connection.
@ -762,7 +819,7 @@ Custom Attributes:
Name | Description Name | Description
------------------------|-------------- ------------------------|--------------
snmp_address | **Optional.** The host's address. Defaults to "$address$". snmp_address | **Optional.** The host's address. Defaults to "$address$" or "$address6$" if the `address` attribute is not set.
snmp_nocrypt | **Optional.** Define SNMP encryption. If set **snmp_v3** needs to be set. Defaults to "false". snmp_nocrypt | **Optional.** Define SNMP encryption. If set **snmp_v3** needs to be set. Defaults to "false".
snmp_community | **Optional.** The SNMP community. Defaults to "public". snmp_community | **Optional.** The SNMP community. Defaults to "public".
snmp_port | **Optional.** The SNMP port connection. snmp_port | **Optional.** The SNMP port connection.
@ -786,7 +843,7 @@ Custom Attributes:
Name | Description Name | Description
------------------------|-------------- ------------------------|--------------
snmp_address | **Optional.** The host's address. Defaults to "$address$". snmp_address | **Optional.** The host's address. Defaults to "$address$" or "$address6$" if the `address` attribute is not set.
snmp_nocrypt | **Optional.** Define SNMP encryption. If set **snmp_v3** needs to be set. Defaults to "false". snmp_nocrypt | **Optional.** Define SNMP encryption. If set **snmp_v3** needs to be set. Defaults to "false".
snmp_community | **Optional.** The SNMP community. Defaults to "public". snmp_community | **Optional.** The SNMP community. Defaults to "public".
snmp_port | **Optional.** The SNMP port connection. snmp_port | **Optional.** The SNMP port connection.
@ -811,7 +868,7 @@ Custom Attributes:
Name | Description Name | Description
----------------------------|-------------- ----------------------------|--------------
snmp_address | **Optional.** The host's address. Defaults to "$address$". snmp_address | **Optional.** The host's address. Defaults to "$address$" or "$address6$" if the `address` attribute is not set.
snmp_nocrypt | **Optional.** Define SNMP encryption. If set **snmp_v3** needs to be set. Defaults to "false". snmp_nocrypt | **Optional.** Define SNMP encryption. If set **snmp_v3** needs to be set. Defaults to "false".
snmp_community | **Optional.** The SNMP community. Defaults to "public". snmp_community | **Optional.** The SNMP community. Defaults to "public".
snmp_port | **Optional.** The SNMP port connection. snmp_port | **Optional.** The SNMP port connection.
@ -847,7 +904,7 @@ Custom Attributes:
Name | Description Name | Description
------------------------|-------------- ------------------------|--------------
snmp_address | **Optional.** The host's address. Defaults to "$address$". snmp_address | **Optional.** The host's address. Defaults to "$address$" or "$address6$" if the `address` attribute is not set.
snmp_nocrypt | **Optional.** Define SNMP encryption. If set **snmp_v3** needs to be set. Defaults to "false". snmp_nocrypt | **Optional.** Define SNMP encryption. If set **snmp_v3** needs to be set. Defaults to "false".
snmp_community | **Optional.** The SNMP community. Defaults to "public". snmp_community | **Optional.** The SNMP community. Defaults to "public".
snmp_port | **Optional.** The SNMP port connection. snmp_port | **Optional.** The SNMP port connection.

View File

@ -49,7 +49,7 @@ apply Service "ssh" {
check_command = "ssh" check_command = "ssh"
assign where host.address && host.vars.os == "Linux" assign where (host.address || host.address6) && host.vars.os == "Linux"
ignore where host.name == "localhost" /* for upgrade safety */ ignore where host.name == "localhost" /* for upgrade safety */
} }

View File

@ -23,6 +23,7 @@
template CheckCommand "snmp-manubulon-command" { template CheckCommand "snmp-manubulon-command" {
import "plugin-check-command" import "plugin-check-command"
import "ipv4-or-ipv6"
arguments = { arguments = {
"-H" = "$snmp_address$" "-H" = "$snmp_address$"
@ -56,7 +57,7 @@ template CheckCommand "snmp-manubulon-command" {
"-t" = "$snmp_timeout$" "-t" = "$snmp_timeout$"
} }
vars.snmp_address = "$address$" vars.snmp_address = "$check_address$"
vars.snmp_nocrypt = true vars.snmp_nocrypt = true
vars.snmp_community = "public" vars.snmp_community = "public"
vars.snmp_v2 = false vars.snmp_v2 = false

View File

@ -17,6 +17,19 @@
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
******************************************************************************/ ******************************************************************************/
template CheckCommand "ipv4-or-ipv6" {
vars.check_address = {{
var addr_v4 = macro("$address$")
var addr_v6 = macro("$address6$")
if (addr_v4) {
return addr_v4
} else {
return addr_v6
}
}}
}
template CheckCommand "ping-common" { template CheckCommand "ping-common" {
import "plugin-check-command" import "plugin-check-command"
@ -36,6 +49,13 @@ template CheckCommand "ping-common" {
vars.ping_cpl = 15 vars.ping_cpl = 15
} }
object CheckCommand "ping" {
import "ping-common"
import "ipv4-or-ipv6"
vars.ping_address = "$check_address$"
}
object CheckCommand "ping4" { object CheckCommand "ping4" {
import "ping-common" import "ping-common"
@ -52,9 +72,7 @@ object CheckCommand "ping6" {
vars.ping_address = "$address6$" vars.ping_address = "$address6$"
} }
object CheckCommand "hostalive" { template CheckCommand "hostalive-common" {
import "ping4"
vars.ping_wrta = 3000.0 vars.ping_wrta = 3000.0
vars.ping_wpl = 80 vars.ping_wpl = 80
@ -62,6 +80,21 @@ object CheckCommand "hostalive" {
vars.ping_cpl = 100 vars.ping_cpl = 100
} }
object CheckCommand "hostalive" {
import "ping"
import "hostalive-common"
}
object CheckCommand "hostalive4" {
import "ping4"
import "hostalive-common"
}
object CheckCommand "hostalive6" {
import "ping6"
import "hostalive-common"
}
template CheckCommand "fping-common" { template CheckCommand "fping-common" {
import "plugin-check-command" import "plugin-check-command"
@ -127,6 +160,7 @@ object CheckCommand "passive" {
object CheckCommand "tcp" { object CheckCommand "tcp" {
import "plugin-check-command" import "plugin-check-command"
import "ipv4-or-ipv6"
command = [ command = [
PluginDir + "/check_tcp", PluginDir + "/check_tcp",
@ -134,11 +168,12 @@ object CheckCommand "tcp" {
"-p", "$tcp_port$" "-p", "$tcp_port$"
] ]
vars.tcp_address = "$address$" vars.tcp_address = "$check_address$"
} }
object CheckCommand "ssl" { object CheckCommand "ssl" {
import "plugin-check-command" import "plugin-check-command"
import "ipv4-or-ipv6"
command = [ PluginDir + "/check_tcp" ] command = [ PluginDir + "/check_tcp" ]
@ -150,11 +185,12 @@ object CheckCommand "ssl" {
"-D" = "$ssl_cert_valid_days_warn$,$ssl_cert_valid_days_critical$" "-D" = "$ssl_cert_valid_days_warn$,$ssl_cert_valid_days_critical$"
} }
vars.ssl_address = "$address$" vars.ssl_address = "$check_address$"
} }
object CheckCommand "udp" { object CheckCommand "udp" {
import "plugin-check-command" import "plugin-check-command"
import "ipv4-or-ipv6"
command = [ command = [
PluginDir + "/check_udp", PluginDir + "/check_udp",
@ -162,11 +198,12 @@ object CheckCommand "udp" {
"-p", "$udp_port$" "-p", "$udp_port$"
] ]
vars.udp_address = "$address$" vars.udp_address = "$check_address$"
} }
object CheckCommand "http" { object CheckCommand "http" {
import "plugin-check-command" import "plugin-check-command"
import "ipv4-or-ipv6"
command = [ PluginDir + "/check_http" ] command = [ PluginDir + "/check_http" ]
@ -276,7 +313,7 @@ object CheckCommand "http" {
} }
} }
vars.http_address = "$address$" vars.http_address = "$check_address$"
vars.http_ssl = false vars.http_ssl = false
vars.http_sni = false vars.http_sni = false
vars.http_linespan = false vars.http_linespan = false
@ -285,6 +322,7 @@ object CheckCommand "http" {
object CheckCommand "ftp" { object CheckCommand "ftp" {
import "plugin-check-command" import "plugin-check-command"
import "ipv4-or-ipv6"
command = [ PluginDir + "/check_ftp" ] command = [ PluginDir + "/check_ftp" ]
@ -292,11 +330,12 @@ object CheckCommand "ftp" {
"-H" = "$ftp_address$" "-H" = "$ftp_address$"
} }
vars.ftp_address = "$address$" vars.ftp_address = "$check_address$"
} }
object CheckCommand "smtp" { object CheckCommand "smtp" {
import "plugin-check-command" import "plugin-check-command"
import "ipv4-or-ipv6"
command = [ PluginDir + "/check_smtp" ] command = [ PluginDir + "/check_smtp" ]
@ -306,11 +345,12 @@ object CheckCommand "smtp" {
"-f" = "$smtp_mail_from$" "-f" = "$smtp_mail_from$"
} }
vars.smtp_address = "$address$" vars.smtp_address = "$check_address$"
} }
object CheckCommand "ssmtp" { object CheckCommand "ssmtp" {
import "plugin-check-command" import "plugin-check-command"
import "ipv4-or-ipv6"
command = [ PluginDir + "/check_ssmtp" ] command = [ PluginDir + "/check_ssmtp" ]
arguments = { arguments = {
@ -318,11 +358,12 @@ object CheckCommand "ssmtp" {
"-p" = "$ssmtp_port$" "-p" = "$ssmtp_port$"
} }
vars.ssmtp_address = "$address$" vars.ssmtp_address = "$check_address$"
} }
object CheckCommand "imap" { object CheckCommand "imap" {
import "plugin-check-command" import "plugin-check-command"
import "ipv4-or-ipv6"
command = [ PluginDir + "/check_imap" ] command = [ PluginDir + "/check_imap" ]
@ -331,11 +372,12 @@ object CheckCommand "imap" {
"-p" = "$imap_port$" "-p" = "$imap_port$"
} }
vars.imap_address = "$address$" vars.imap_address = "$check_address$"
} }
object CheckCommand "simap" { object CheckCommand "simap" {
import "plugin-check-command" import "plugin-check-command"
import "ipv4-or-ipv6"
command = [ PluginDir + "/check_simap" ] command = [ PluginDir + "/check_simap" ]
@ -344,11 +386,12 @@ object CheckCommand "simap" {
"-p" = "$simap_port$" "-p" = "$simap_port$"
} }
vars.simap_address = "$address$" vars.simap_address = "$check_address$"
} }
object CheckCommand "pop" { object CheckCommand "pop" {
import "plugin-check-command" import "plugin-check-command"
import "ipv4-or-ipv6"
command = [ PluginDir + "/check_pop" ] command = [ PluginDir + "/check_pop" ]
@ -357,11 +400,12 @@ object CheckCommand "pop" {
"-p" = "$pop_port$" "-p" = "$pop_port$"
} }
vars.pop_address = "$address$" vars.pop_address = "$check_address$"
} }
object CheckCommand "spop" { object CheckCommand "spop" {
import "plugin-check-command" import "plugin-check-command"
import "ipv4-or-ipv6"
command = [ PluginDir + "/check_spop" ] command = [ PluginDir + "/check_spop" ]
@ -370,11 +414,12 @@ object CheckCommand "spop" {
"-p" = "$spop_port$" "-p" = "$spop_port$"
} }
vars.spop_address = "$address$" vars.spop_address = "$check_address$"
} }
object CheckCommand "ntp_time" { object CheckCommand "ntp_time" {
import "plugin-check-command" import "plugin-check-command"
import "ipv4-or-ipv6"
command = [ PluginDir + "/check_ntp_time" ] command = [ PluginDir + "/check_ntp_time" ]
@ -382,11 +427,12 @@ object CheckCommand "ntp_time" {
"-H" = "$ntp_address$" "-H" = "$ntp_address$"
} }
vars.ntp_address = "$address$" vars.ntp_address = "$check_address$"
} }
object CheckCommand "ssh" { object CheckCommand "ssh" {
import "plugin-check-command" import "plugin-check-command"
import "ipv4-or-ipv6"
command = [ PluginDir + "/check_ssh" ] command = [ PluginDir + "/check_ssh" ]
@ -400,7 +446,7 @@ object CheckCommand "ssh" {
} }
} }
vars.ssh_address = "$address$" vars.ssh_address = "$check_address$"
} }
object CheckCommand "disk" { object CheckCommand "disk" {
@ -672,6 +718,7 @@ object CheckCommand "load" {
object CheckCommand "snmp" { object CheckCommand "snmp" {
import "plugin-check-command" import "plugin-check-command"
import "ipv4-or-ipv6"
command = [ PluginDir + "/check_snmp" ] command = [ PluginDir + "/check_snmp" ]
@ -693,7 +740,7 @@ object CheckCommand "snmp" {
} }
} }
vars.snmp_address = "$address$" vars.snmp_address = "$check_address$"
vars.snmp_community = "public" vars.snmp_community = "public"
vars.snmp_invert_search = false vars.snmp_invert_search = false
vars.snmp_timeout = "10" vars.snmp_timeout = "10"
@ -701,6 +748,7 @@ object CheckCommand "snmp" {
object CheckCommand "snmpv3" { object CheckCommand "snmpv3" {
import "plugin-check-command" import "plugin-check-command"
import "ipv4-or-ipv6"
command = [ PluginDir + "/check_snmp" ] command = [ PluginDir + "/check_snmp" ]
@ -719,7 +767,7 @@ object CheckCommand "snmpv3" {
"-l" = "$snmpv3_label$" "-l" = "$snmpv3_label$"
} }
vars.snmpv3_address = "$address$" vars.snmpv3_address = "$check_address$"
vars.snmpv3_auth_alg = "SHA" vars.snmpv3_auth_alg = "SHA"
vars.snmpv3_priv_alg = "AES" vars.snmpv3_priv_alg = "AES"
} }
@ -757,6 +805,7 @@ object CheckCommand "dhcp" {
object CheckCommand "dns" { object CheckCommand "dns" {
import "plugin-check-command" import "plugin-check-command"
import "ipv4-or-ipv6"
command = [ PluginDir + "/check_dns" ] command = [ PluginDir + "/check_dns" ]
@ -774,11 +823,12 @@ object CheckCommand "dns" {
} }
vars.dns_lookup = "$host_name$" vars.dns_lookup = "$host_name$"
vars.dns_expected_answer = "$address$" vars.dns_expected_answer = "$check_address$"
} }
object CheckCommand "dig" { object CheckCommand "dig" {
import "plugin-check-command" import "plugin-check-command"
import "ipv4-or-ipv6"
command = [ PluginDir + "/check_dig" ] command = [ PluginDir + "/check_dig" ]
@ -787,11 +837,12 @@ object CheckCommand "dig" {
"-l" = "$dig_lookup$" "-l" = "$dig_lookup$"
} }
vars.dig_server = "$address$" vars.dig_server = "$check_address$"
} }
object CheckCommand "nscp" { object CheckCommand "nscp" {
import "plugin-check-command" import "plugin-check-command"
import "ipv4-or-ipv6"
command = [ PluginDir + "/check_nt" ] command = [ PluginDir + "/check_nt" ]
@ -812,12 +863,13 @@ object CheckCommand "nscp" {
"-t" = "$nscp_timeout$" "-t" = "$nscp_timeout$"
} }
vars.nscp_address = "$address$" vars.nscp_address = "$check_address$"
vars.nscp_port = 12489 vars.nscp_port = 12489
} }
object CheckCommand "by_ssh" { object CheckCommand "by_ssh" {
import "plugin-check-command" import "plugin-check-command"
import "ipv4-or-ipv6"
command = [ PluginDir + "/check_by_ssh" ] command = [ PluginDir + "/check_by_ssh" ]
@ -835,12 +887,13 @@ object CheckCommand "by_ssh" {
"-t" = "$by_ssh_timeout$" "-t" = "$by_ssh_timeout$"
} }
vars.by_ssh_address = "$address$" vars.by_ssh_address = "$check_address$"
vars.by_ssh_quiet = false vars.by_ssh_quiet = false
} }
object CheckCommand "ups" { object CheckCommand "ups" {
import "plugin-check-command" import "plugin-check-command"
import "ipv4-or-ipv6"
command = [ PluginDir + "/check_ups" ] command = [ PluginDir + "/check_ups" ]
@ -849,12 +902,13 @@ object CheckCommand "ups" {
"-u" = "$ups_name$" "-u" = "$ups_name$"
} }
vars.ups_address = "$address$" vars.ups_address = "$check_address$"
vars.ups_name = "ups" vars.ups_name = "ups"
} }
object CheckCommand "nrpe" { object CheckCommand "nrpe" {
import "plugin-check-command" import "plugin-check-command"
import "ipv4-or-ipv6"
command = [ PluginDir + "/check_nrpe" ] command = [ PluginDir + "/check_nrpe" ]
@ -878,7 +932,7 @@ object CheckCommand "nrpe" {
} }
} }
vars.nrpe_address = "$address$" vars.nrpe_address = "$check_address$"
vars.nrpe_no_ssl = false vars.nrpe_no_ssl = false
vars.nrpe_timeout_unknown = false vars.nrpe_timeout_unknown = false
@ -887,6 +941,7 @@ object CheckCommand "nrpe" {
object CheckCommand "hpjd" { object CheckCommand "hpjd" {
import "plugin-check-command" import "plugin-check-command"
import "ipv4-or-ipv6"
command = [ PluginDir + "/check_hpjd" ] command = [ PluginDir + "/check_hpjd" ]
@ -896,7 +951,7 @@ object CheckCommand "hpjd" {
"-p" = "$hpjd_port$" "-p" = "$hpjd_port$"
} }
vars.hpjd_address = "$address$" vars.hpjd_address = "$check_address$"
} }
object CheckCommand "icmp" { object CheckCommand "icmp" {