From: Gunnar Beutner Date: Wed, 13 May 2015 06:45:19 +0000 (+0200) Subject: Add the --load-all and --log options for nscp-local X-Git-Tag: v2.3.5~37 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d3da9f16881682d851e843df2a182672cc3aba42;p=icinga2 Add the --load-all and --log options for nscp-local fixes #9261 --- diff --git a/doc/7-icinga-template-library.md b/doc/7-icinga-template-library.md index e2d6fe3b0..34d72c74a 100644 --- a/doc/7-icinga-template-library.md +++ b/doc/7-icinga-template-library.md @@ -1029,6 +1029,8 @@ Custom attributes passed as [command parameters](3-monitoring-basics.md#command- Name | Description ----------------|-------------- nscp_path | **Optional.** Can be used to override the NSClient++ on a per-command basis. Defaults to NscpPath. +nscp_log_level | **Optional.** The log level. Defaults to "critical". +nscp_load_all | **Optional.** Whether to load all modules. Defaults to true. nscp_boot | **Optional.** Whether to use the --boot option. Defaults to true. nscp_query | **Required.** The NSClient++ query. Try `nscp client -q x` for a list. nscp_arguments | **Optional.** An array of query arguments. diff --git a/itl/command-nscp-local.conf b/itl/command-nscp-local.conf index ed97fad50..f65520502 100644 --- a/itl/command-nscp-local.conf +++ b/itl/command-nscp-local.conf @@ -27,6 +27,8 @@ object CheckCommand "nscp-local" { command = [ NscpPath, "client" ] arguments = { + "--log" = "$nscp_log_level$" + "--load-all" = { set_if ="$nscp_load_all$" } "-q" = { value = "$nscp_query$" required = true @@ -38,6 +40,8 @@ object CheckCommand "nscp-local" { } vars.nscp_path = {{ NscpPath }} + vars.nscp_log_level = "critical" + vars.nscp_load_all = true vars.nscp_boot = true }