From bb033b5ce3e70a1c2b3941ac5c4e0b8c7993b002 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Fri, 13 Feb 2015 11:52:08 +0100 Subject: [PATCH] Fall back to using address6 when the address attribute is not set fixes #8259 --- doc/7-icinga-template-library.md | 111 ++++++++++++++++++++++------- etc/icinga2/conf.d/services.conf | 2 +- itl/command-plugins-manubulon.conf | 3 +- itl/command-plugins.conf | 105 ++++++++++++++++++++------- 4 files changed, 167 insertions(+), 54 deletions(-) diff --git a/doc/7-icinga-template-library.md b/doc/7-icinga-template-library.md index 05a520478..220137498 100644 --- a/doc/7-icinga-template-library.md +++ b/doc/7-icinga-template-library.md @@ -86,7 +86,7 @@ Custom Attributes: 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_command | **Optional.** The command that should be executed. by_ssh_logname | **Optional.** The SSH username. @@ -237,12 +237,32 @@ Custom Attributes: 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. ### 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). + + +### hostalive4 + +Check command object for the `check_ping` plugin with host check default values. This variant +uses the host's `address` attribute. 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). +### 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). + + ### hpjd Check command object for the `check_hpjd` plugin. @@ -265,7 +303,7 @@ Custom Attributes: 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_community | **Optional.** The SNMP community. Defaults to "public". @@ -278,7 +316,7 @@ Custom Attributes: 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_uri | **Optional.** The request URI. http_port | **Optional.** The TCP port. Defaults to 80 when not using SSL, 443 otherwise. @@ -341,7 +379,7 @@ Custom Attributes: 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. @@ -369,7 +407,7 @@ Custom Attributes: 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_command | **Optional.** The command that should be executed. nrpe_no_ssl | **Optional.** Whether to disable SSL or not. Defaults to `false`. @@ -386,7 +424,7 @@ Custom Attributes: 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_password | **Optional.** The NSClient++ password. nscp_variable | **Required.** The variable that should be checked. @@ -404,7 +442,7 @@ Custom Attributes: 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. ### 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.". +### 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). + + ### ping4 Check command object for the `check_ping` plugin. @@ -460,7 +517,7 @@ Custom Attributes: 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. @@ -505,7 +562,7 @@ Custom Attributes: 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. @@ -517,7 +574,7 @@ Custom Attributes: 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_mail_from | **Optional.** Test a MAIL FROM command with the given email address. @@ -530,7 +587,7 @@ Custom Attributes: 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_community | **Optional.** The SNMP community. Defaults to "public". snmp_warn | **Optional.** The warning threshold. @@ -551,7 +608,7 @@ Custom Attributes: 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_auth_alg | **Optional.** The authentication algorithm. Defaults to SHA. snmpv3_auth_key | **Required.** The authentication key. @@ -570,7 +627,7 @@ Custom Attributes: 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_community | **Optional.** The SNMP community. Defaults to "public". @@ -583,7 +640,7 @@ Custom Attributes: 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. @@ -595,7 +652,7 @@ Custom Attributes: 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_timeout | **Optional.** Seconds before connection times out. Defaults to 10. @@ -608,7 +665,7 @@ Custom Attributes: 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_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. @@ -623,7 +680,7 @@ Custom Attributes: 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. @@ -647,7 +704,7 @@ Custom Attributes: 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. @@ -659,7 +716,7 @@ Custom Attributes: 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. @@ -671,7 +728,7 @@ Custom Attributes: 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`. @@ -737,7 +794,7 @@ Custom Attributes: 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_community | **Optional.** The SNMP community. Defaults to "public". snmp_port | **Optional.** The SNMP port connection. @@ -762,7 +819,7 @@ Custom Attributes: 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_community | **Optional.** The SNMP community. Defaults to "public". snmp_port | **Optional.** The SNMP port connection. @@ -786,7 +843,7 @@ Custom Attributes: 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_community | **Optional.** The SNMP community. Defaults to "public". snmp_port | **Optional.** The SNMP port connection. @@ -811,7 +868,7 @@ Custom Attributes: 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_community | **Optional.** The SNMP community. Defaults to "public". snmp_port | **Optional.** The SNMP port connection. @@ -847,7 +904,7 @@ Custom Attributes: 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_community | **Optional.** The SNMP community. Defaults to "public". snmp_port | **Optional.** The SNMP port connection. diff --git a/etc/icinga2/conf.d/services.conf b/etc/icinga2/conf.d/services.conf index 014f07784..4decbcf53 100644 --- a/etc/icinga2/conf.d/services.conf +++ b/etc/icinga2/conf.d/services.conf @@ -49,7 +49,7 @@ apply Service "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 */ } diff --git a/itl/command-plugins-manubulon.conf b/itl/command-plugins-manubulon.conf index e2cb4b4bc..0850ee2b0 100644 --- a/itl/command-plugins-manubulon.conf +++ b/itl/command-plugins-manubulon.conf @@ -23,6 +23,7 @@ template CheckCommand "snmp-manubulon-command" { import "plugin-check-command" + import "ipv4-or-ipv6" arguments = { "-H" = "$snmp_address$" @@ -56,7 +57,7 @@ template CheckCommand "snmp-manubulon-command" { "-t" = "$snmp_timeout$" } - vars.snmp_address = "$address$" + vars.snmp_address = "$check_address$" vars.snmp_nocrypt = true vars.snmp_community = "public" vars.snmp_v2 = false diff --git a/itl/command-plugins.conf b/itl/command-plugins.conf index a8849b840..1b5f28b44 100644 --- a/itl/command-plugins.conf +++ b/itl/command-plugins.conf @@ -17,6 +17,19 @@ * 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" { import "plugin-check-command" @@ -36,6 +49,13 @@ template CheckCommand "ping-common" { vars.ping_cpl = 15 } +object CheckCommand "ping" { + import "ping-common" + import "ipv4-or-ipv6" + + vars.ping_address = "$check_address$" +} + object CheckCommand "ping4" { import "ping-common" @@ -52,9 +72,7 @@ object CheckCommand "ping6" { vars.ping_address = "$address6$" } -object CheckCommand "hostalive" { - import "ping4" - +template CheckCommand "hostalive-common" { vars.ping_wrta = 3000.0 vars.ping_wpl = 80 @@ -62,6 +80,21 @@ object CheckCommand "hostalive" { 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" { import "plugin-check-command" @@ -127,6 +160,7 @@ object CheckCommand "passive" { object CheckCommand "tcp" { import "plugin-check-command" + import "ipv4-or-ipv6" command = [ PluginDir + "/check_tcp", @@ -134,11 +168,12 @@ object CheckCommand "tcp" { "-p", "$tcp_port$" ] - vars.tcp_address = "$address$" + vars.tcp_address = "$check_address$" } object CheckCommand "ssl" { import "plugin-check-command" + import "ipv4-or-ipv6" command = [ PluginDir + "/check_tcp" ] @@ -150,11 +185,12 @@ object CheckCommand "ssl" { "-D" = "$ssl_cert_valid_days_warn$,$ssl_cert_valid_days_critical$" } - vars.ssl_address = "$address$" + vars.ssl_address = "$check_address$" } object CheckCommand "udp" { import "plugin-check-command" + import "ipv4-or-ipv6" command = [ PluginDir + "/check_udp", @@ -162,11 +198,12 @@ object CheckCommand "udp" { "-p", "$udp_port$" ] - vars.udp_address = "$address$" + vars.udp_address = "$check_address$" } object CheckCommand "http" { import "plugin-check-command" + import "ipv4-or-ipv6" 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_sni = false vars.http_linespan = false @@ -285,6 +322,7 @@ object CheckCommand "http" { object CheckCommand "ftp" { import "plugin-check-command" + import "ipv4-or-ipv6" command = [ PluginDir + "/check_ftp" ] @@ -292,11 +330,12 @@ object CheckCommand "ftp" { "-H" = "$ftp_address$" } - vars.ftp_address = "$address$" + vars.ftp_address = "$check_address$" } object CheckCommand "smtp" { import "plugin-check-command" + import "ipv4-or-ipv6" command = [ PluginDir + "/check_smtp" ] @@ -306,11 +345,12 @@ object CheckCommand "smtp" { "-f" = "$smtp_mail_from$" } - vars.smtp_address = "$address$" + vars.smtp_address = "$check_address$" } object CheckCommand "ssmtp" { import "plugin-check-command" + import "ipv4-or-ipv6" command = [ PluginDir + "/check_ssmtp" ] arguments = { @@ -318,11 +358,12 @@ object CheckCommand "ssmtp" { "-p" = "$ssmtp_port$" } - vars.ssmtp_address = "$address$" + vars.ssmtp_address = "$check_address$" } object CheckCommand "imap" { import "plugin-check-command" + import "ipv4-or-ipv6" command = [ PluginDir + "/check_imap" ] @@ -331,11 +372,12 @@ object CheckCommand "imap" { "-p" = "$imap_port$" } - vars.imap_address = "$address$" + vars.imap_address = "$check_address$" } object CheckCommand "simap" { import "plugin-check-command" + import "ipv4-or-ipv6" command = [ PluginDir + "/check_simap" ] @@ -344,11 +386,12 @@ object CheckCommand "simap" { "-p" = "$simap_port$" } - vars.simap_address = "$address$" + vars.simap_address = "$check_address$" } object CheckCommand "pop" { import "plugin-check-command" + import "ipv4-or-ipv6" command = [ PluginDir + "/check_pop" ] @@ -357,11 +400,12 @@ object CheckCommand "pop" { "-p" = "$pop_port$" } - vars.pop_address = "$address$" + vars.pop_address = "$check_address$" } object CheckCommand "spop" { import "plugin-check-command" + import "ipv4-or-ipv6" command = [ PluginDir + "/check_spop" ] @@ -370,11 +414,12 @@ object CheckCommand "spop" { "-p" = "$spop_port$" } - vars.spop_address = "$address$" + vars.spop_address = "$check_address$" } object CheckCommand "ntp_time" { import "plugin-check-command" + import "ipv4-or-ipv6" command = [ PluginDir + "/check_ntp_time" ] @@ -382,11 +427,12 @@ object CheckCommand "ntp_time" { "-H" = "$ntp_address$" } - vars.ntp_address = "$address$" + vars.ntp_address = "$check_address$" } object CheckCommand "ssh" { import "plugin-check-command" + import "ipv4-or-ipv6" command = [ PluginDir + "/check_ssh" ] @@ -400,7 +446,7 @@ object CheckCommand "ssh" { } } - vars.ssh_address = "$address$" + vars.ssh_address = "$check_address$" } object CheckCommand "disk" { @@ -672,6 +718,7 @@ object CheckCommand "load" { object CheckCommand "snmp" { import "plugin-check-command" + import "ipv4-or-ipv6" 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_invert_search = false vars.snmp_timeout = "10" @@ -701,6 +748,7 @@ object CheckCommand "snmp" { object CheckCommand "snmpv3" { import "plugin-check-command" + import "ipv4-or-ipv6" command = [ PluginDir + "/check_snmp" ] @@ -719,7 +767,7 @@ object CheckCommand "snmpv3" { "-l" = "$snmpv3_label$" } - vars.snmpv3_address = "$address$" + vars.snmpv3_address = "$check_address$" vars.snmpv3_auth_alg = "SHA" vars.snmpv3_priv_alg = "AES" } @@ -757,6 +805,7 @@ object CheckCommand "dhcp" { object CheckCommand "dns" { import "plugin-check-command" + import "ipv4-or-ipv6" command = [ PluginDir + "/check_dns" ] @@ -774,11 +823,12 @@ object CheckCommand "dns" { } vars.dns_lookup = "$host_name$" - vars.dns_expected_answer = "$address$" + vars.dns_expected_answer = "$check_address$" } object CheckCommand "dig" { import "plugin-check-command" + import "ipv4-or-ipv6" command = [ PluginDir + "/check_dig" ] @@ -787,11 +837,12 @@ object CheckCommand "dig" { "-l" = "$dig_lookup$" } - vars.dig_server = "$address$" + vars.dig_server = "$check_address$" } object CheckCommand "nscp" { import "plugin-check-command" + import "ipv4-or-ipv6" command = [ PluginDir + "/check_nt" ] @@ -812,12 +863,13 @@ object CheckCommand "nscp" { "-t" = "$nscp_timeout$" } - vars.nscp_address = "$address$" + vars.nscp_address = "$check_address$" vars.nscp_port = 12489 } object CheckCommand "by_ssh" { import "plugin-check-command" + import "ipv4-or-ipv6" command = [ PluginDir + "/check_by_ssh" ] @@ -835,12 +887,13 @@ object CheckCommand "by_ssh" { "-t" = "$by_ssh_timeout$" } - vars.by_ssh_address = "$address$" + vars.by_ssh_address = "$check_address$" vars.by_ssh_quiet = false } object CheckCommand "ups" { import "plugin-check-command" + import "ipv4-or-ipv6" command = [ PluginDir + "/check_ups" ] @@ -849,12 +902,13 @@ object CheckCommand "ups" { "-u" = "$ups_name$" } - vars.ups_address = "$address$" + vars.ups_address = "$check_address$" vars.ups_name = "ups" } object CheckCommand "nrpe" { import "plugin-check-command" + import "ipv4-or-ipv6" 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_timeout_unknown = false @@ -887,6 +941,7 @@ object CheckCommand "nrpe" { object CheckCommand "hpjd" { import "plugin-check-command" + import "ipv4-or-ipv6" command = [ PluginDir + "/check_hpjd" ] @@ -896,7 +951,7 @@ object CheckCommand "hpjd" { "-p" = "$hpjd_port$" } - vars.hpjd_address = "$address$" + vars.hpjd_address = "$check_address$" } object CheckCommand "icmp" { -- 2.40.0