Add -q (query type) option for the dns check command

fixes #5047

Signed-off-by: Gunnar Beutner <gunnar.beutner@icinga.com>
This commit is contained in:
Zachary McGibbon 2017-03-02 09:42:30 -05:00 committed by Gunnar Beutner
parent bb2ee7f495
commit 2ccd8d7323
2 changed files with 6 additions and 0 deletions

View File

@ -322,6 +322,7 @@ 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_query_type | **Optional.** The DNS record query type where TYPE =(A, AAAA, SRV, TXT, MX, ANY). The default query type is 'A' (IPv4 host entry)
dns_expected_answers | **Optional.** The answer(s) to look for. A hostname must end with a dot. Multiple answers must be defined as array.
dns_authoritative | **Optional.** Expect the server to send an authoritative answer.
dns_wtime | **Optional.** Return warning if elapsed time exceeds value.

View File

@ -1532,6 +1532,10 @@ object CheckCommand "dns" {
value = "$dns_server$"
description = "Optional DNS server you want to use for the lookup."
}
"-q" = {
value = "$dns_query_type$"
description = "Optional DNS record query type where TYPE =(A, AAAA, SRV, TXT, MX, ANY). The default query type is 'A' (IPv4 host entry)"
}
"-a" = {
value = "$dns_expected_answers$"
description = "Optional ip address or host you expect the DNS server to return. Host must end with a dot (.). This option can be repeated multiple times (Returns OK if any value match). If multiple addresses are returned at once, you have to match the whole string of addresses separated with commas (sorted alphabetically)."
@ -1554,6 +1558,7 @@ object CheckCommand "dns" {
}
vars.dns_lookup = "$host.name$"
vars.dns_query_type = "A"
vars.dns_timeout = 10
}