Add CheckCommand "dns"

Refs #6487
This commit is contained in:
Gerd von Egidy 2014-06-16 01:03:08 +02:00 committed by Michael Friedrich
parent 2dc4b968d9
commit a4a015c8be
2 changed files with 31 additions and 0 deletions

View File

@ -2079,6 +2079,19 @@ snmp_community | **Optional.** The SNMP community. Defaults to "public".
#### <a id="plugin-check-command-dhcp"></a> dhcp
Check command object for the `check_dns` plugin.
Custom Attributes:
Name | Description
---------------------|--------------
dns_lookup | **Optional.** The hostname or IP to query the dns for. Defaults to $host_name$.
dns_server | **Optional.** The DNS server to query. Defaults to the server configured in the OS.
dns_expected_answer | **Optional.** The answer to look for. A hostname must end with a dot.
dns_authorative | **Optional.** Expect the server to send an authorative answer.
#### <a id="plugin-check-command-dns"></a> dns
Check command object for the `check_dhcp` plugin.
Custom Attributes:

View File

@ -423,6 +423,24 @@ object CheckCommand "dhcp" {
vars.dhcp_unicast = false
}
object CheckCommand "dns" {
import "plugin-check-command"
command = PluginDir + "/check_dns"
arguments = {
"-H" = "$dns_lookup$",
"-s" = "$dns_server$",
"-a" = "$dns_expected_answer$",
"-A" = {
set_if = "$dns_authorative$"
}
}
vars.dns_lookup = "$host_name$"
vars.dns_expected_answer = "$address$"
}
object CheckCommand "nscp" {
import "plugin-check-command"