From: Petr Ruzicka Date: Thu, 8 Jun 2017 14:45:26 +0000 (+0200) Subject: Adding accept_cname to dns command definition. X-Git-Tag: v2.7.0~33^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=refs%2Fpull%2F5339%2Fhead;p=icinga2 Adding accept_cname to dns command definition. --- diff --git a/doc/10-icinga-template-library.md b/doc/10-icinga-template-library.md index 96c2983ae..2ea03200a 100644 --- a/doc/10-icinga-template-library.md +++ b/doc/10-icinga-template-library.md @@ -325,6 +325,7 @@ dns_server | **Optional.** The DNS server to query. Defaults to the se 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_accept_cname | **Optional.** Accept cname responses as a valid result to a query. dns_wtime | **Optional.** Return warning if elapsed time exceeds value. dns_ctime | **Optional.** Return critical if elapsed time exceeds value. dns_timeout | **Optional.** Seconds before connection times out. Defaults to 10. diff --git a/itl/command-plugins.conf b/itl/command-plugins.conf index 57152ee12..a63f9fbbc 100644 --- a/itl/command-plugins.conf +++ b/itl/command-plugins.conf @@ -1565,6 +1565,11 @@ object CheckCommand "dns" { } "-A" = { set_if = "$dns_authoritative$" + description = "Optionally expect the DNS server to be authoritative for the lookup" + } + "-n" = { + set_if = "$dns_accept_cname$" + description = "Optionally accept cname responses as a valid result to a query. The default is to ignore cname responses as part of the result" } "-w" = { value = "$dns_wtime$"