From: Gunnar Beutner Date: Thu, 22 Oct 2015 12:53:11 +0000 (+0200) Subject: Fix: 'dig_lookup' custom attribute for the 'dig' check command isn't optional X-Git-Tag: v2.4.0~158 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4cf4ffe89398df02cdd72596f8fa12b07807fa14;p=icinga2 Fix: 'dig_lookup' custom attribute for the 'dig' check command isn't optional fixes #10433 --- diff --git a/doc/7-icinga-template-library.md b/doc/7-icinga-template-library.md index ffdb14f98..45a088fa3 100644 --- a/doc/7-icinga-template-library.md +++ b/doc/7-icinga-template-library.md @@ -143,7 +143,7 @@ Name | Description ---------------------|-------------- dig_server | **Optional.** The DNS server to query. Defaults to "127.0.0.1". dig_port | **Optional.** Port number (default: 53). -dig_lookup | **Optional.** The address that should be looked up. +dig_lookup | **Required.** The address that should be looked up. dig_record_type | **Optional.** Record type to lookup (default: A). dig_expected_address | **Optional.** An address expected to be in the answer section. If not set, uses whatever was in -l. dig_arguments | **Optional.** Pass STRING as argument(s) to dig. diff --git a/itl/command-plugins.conf b/itl/command-plugins.conf index 4ebd338c3..a46580b68 100644 --- a/itl/command-plugins.conf +++ b/itl/command-plugins.conf @@ -1223,7 +1223,10 @@ object CheckCommand "dig" { arguments = { "-H" = "$dig_server$" "-p" = "$dig_port$" - "-l" = "$dig_lookup$" + "-l" = { + value = "$dig_lookup$" + required = true + } "-T" = "$dig_record_type$" "-a" = "$dig_expected_address$" "-A" = "$dig_arguments$"