]> granicus.if.org Git - icinga2/commitdiff
Add the --load-all and --log options for nscp-local
authorGunnar Beutner <gunnar@beutner.name>
Wed, 13 May 2015 06:45:19 +0000 (08:45 +0200)
committerGunnar Beutner <gunnar@beutner.name>
Wed, 13 May 2015 08:17:24 +0000 (10:17 +0200)
fixes #9261

doc/7-icinga-template-library.md
itl/command-nscp-local.conf

index e2d6fe3b085b751197eca9045a95f00589d412c8..34d72c74a0f2fa846ad65d0b331548f54b9dea14 100644 (file)
@@ -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.
index ed97fad501d858b2db0a4426c910ed732e437d21..f65520502ab704ca2fa1fcce98971019337c8e04 100644 (file)
@@ -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
 }