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.
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
-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:
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
Check command object for the `check_hpjd` plugin.
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".
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.
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.
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`.
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.
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
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
Check command object for the `check_ping` plugin.
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.
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.
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.
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.
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.
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".
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.
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.
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.
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.
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.
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.
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`.
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.
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.
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.
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.
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.
* 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"
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"
vars.ping_address = "$address6$"
}
-object CheckCommand "hostalive" {
- import "ping4"
-
+template CheckCommand "hostalive-common" {
vars.ping_wrta = 3000.0
vars.ping_wpl = 80
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"
object CheckCommand "tcp" {
import "plugin-check-command"
+ import "ipv4-or-ipv6"
command = [
PluginDir + "/check_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" ]
"-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",
"-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" ]
}
}
- vars.http_address = "$address$"
+ vars.http_address = "$check_address$"
vars.http_ssl = false
vars.http_sni = false
vars.http_linespan = false
object CheckCommand "ftp" {
import "plugin-check-command"
+ import "ipv4-or-ipv6"
command = [ PluginDir + "/check_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" ]
"-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 = {
"-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" ]
"-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" ]
"-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" ]
"-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" ]
"-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" ]
"-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" ]
}
}
- vars.ssh_address = "$address$"
+ vars.ssh_address = "$check_address$"
}
object CheckCommand "disk" {
object CheckCommand "snmp" {
import "plugin-check-command"
+ import "ipv4-or-ipv6"
command = [ PluginDir + "/check_snmp" ]
}
}
- vars.snmp_address = "$address$"
+ vars.snmp_address = "$check_address$"
vars.snmp_community = "public"
vars.snmp_invert_search = false
vars.snmp_timeout = "10"
object CheckCommand "snmpv3" {
import "plugin-check-command"
+ import "ipv4-or-ipv6"
command = [ PluginDir + "/check_snmp" ]
"-l" = "$snmpv3_label$"
}
- vars.snmpv3_address = "$address$"
+ vars.snmpv3_address = "$check_address$"
vars.snmpv3_auth_alg = "SHA"
vars.snmpv3_priv_alg = "AES"
}
object CheckCommand "dns" {
import "plugin-check-command"
+ import "ipv4-or-ipv6"
command = [ PluginDir + "/check_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" ]
"-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" ]
"-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" ]
"-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" ]
"-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" ]
}
}
- vars.nrpe_address = "$address$"
+ vars.nrpe_address = "$check_address$"
vars.nrpe_no_ssl = false
vars.nrpe_timeout_unknown = false
object CheckCommand "hpjd" {
import "plugin-check-command"
+ import "ipv4-or-ipv6"
command = [ PluginDir + "/check_hpjd" ]
"-p" = "$hpjd_port$"
}
- vars.hpjd_address = "$address$"
+ vars.hpjd_address = "$check_address$"
}
object CheckCommand "icmp" {