From 9e663eea4b869e583680377ed4f5f6e53ae0a987 Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Fri, 19 Jun 2015 13:30:26 +0200 Subject: [PATCH] Fix wrong nscp path w/ command_endpoint runtime macros Do not allow to override the nscp path by runtime macros. This causes the (linux) master to send just "." as $nscp_path$ and the windows client ignores the local global constant NscpPath being overridden by the master. Only happens with command_endpoints where runtime macros are passed from the master to the clients. fixes #9456 --- doc/7-icinga-template-library.md | 1 - itl/command-nscp-local.conf | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/doc/7-icinga-template-library.md b/doc/7-icinga-template-library.md index a2bf939d1..8ed242c27 100644 --- a/doc/7-icinga-template-library.md +++ b/doc/7-icinga-template-library.md @@ -1051,7 +1051,6 @@ 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. diff --git a/itl/command-nscp-local.conf b/itl/command-nscp-local.conf index 9f1a3f5b2..2ff5ff6e1 100644 --- a/itl/command-nscp-local.conf +++ b/itl/command-nscp-local.conf @@ -24,7 +24,7 @@ if (!globals.contains("NscpPath")) { object CheckCommand "nscp-local" { import "plugin-check-command" - command = [ "$nscp_path$\\nscp.exe", "client" ] + command = [ NscpPath + "\\nscp.exe", "client" ] arguments = { "--log" = "$nscp_log_level$" @@ -39,7 +39,6 @@ object CheckCommand "nscp-local" { "-a" = "$nscp_arguments$" } - vars.nscp_path = {{ NscpPath }} vars.nscp_log_level = "critical" vars.nscp_load_all = true vars.nscp_boot = true