From d3da9f16881682d851e843df2a182672cc3aba42 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Wed, 13 May 2015 08:45:19 +0200 Subject: [PATCH] Add the --load-all and --log options for nscp-local fixes #9261 --- doc/7-icinga-template-library.md | 2 ++ itl/command-nscp-local.conf | 4 ++++ 2 files changed, 6 insertions(+) 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 }