From f260f5e73b9356277d99b85c44f374b2c4a78dee Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Tue, 10 Sep 2013 10:33:15 +0200 Subject: [PATCH] Fix macro priority. --- lib/icinga/pluginchecktask.cpp | 2 +- lib/icinga/plugineventtask.cpp | 2 +- lib/icinga/pluginnotificationtask.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/icinga/pluginchecktask.cpp b/lib/icinga/pluginchecktask.cpp index c3fee3a99..b40f386dc 100644 --- a/lib/icinga/pluginchecktask.cpp +++ b/lib/icinga/pluginchecktask.cpp @@ -41,9 +41,9 @@ Dictionary::Ptr PluginCheckTask::ScriptFunc(const Service::Ptr& service) Value raw_command = commandObj->GetCommandLine(); std::vector resolvers; - resolvers.push_back(commandObj); resolvers.push_back(service); resolvers.push_back(service->GetHost()); + resolvers.push_back(commandObj); resolvers.push_back(IcingaApplication::GetInstance()); Value command = MacroProcessor::ResolveMacros(raw_command, resolvers, Dictionary::Ptr(), Utility::EscapeShellCmd, commandObj->GetEscapeMacros()); diff --git a/lib/icinga/plugineventtask.cpp b/lib/icinga/plugineventtask.cpp index 78afaa78d..b29b74526 100644 --- a/lib/icinga/plugineventtask.cpp +++ b/lib/icinga/plugineventtask.cpp @@ -39,9 +39,9 @@ void PluginEventTask::ScriptFunc(const Service::Ptr& service) Value raw_command = commandObj->GetCommandLine(); std::vector resolvers; - resolvers.push_back(commandObj); resolvers.push_back(service); resolvers.push_back(service->GetHost()); + resolvers.push_back(commandObj); resolvers.push_back(IcingaApplication::GetInstance()); Value command = MacroProcessor::ResolveMacros(raw_command, resolvers, Dictionary::Ptr(), Utility::EscapeShellCmd, commandObj->GetEscapeMacros()); diff --git a/lib/icinga/pluginnotificationtask.cpp b/lib/icinga/pluginnotificationtask.cpp index aec950e48..5560a28ab 100644 --- a/lib/icinga/pluginnotificationtask.cpp +++ b/lib/icinga/pluginnotificationtask.cpp @@ -50,10 +50,10 @@ void PluginNotificationTask::ScriptFunc(const Notification::Ptr& notification, c std::vector resolvers; resolvers.push_back(user); resolvers.push_back(notificationMacroResolver); - resolvers.push_back(commandObj); resolvers.push_back(notification); resolvers.push_back(service); resolvers.push_back(service->GetHost()); + resolvers.push_back(commandObj); resolvers.push_back(IcingaApplication::GetInstance()); Value command = MacroProcessor::ResolveMacros(raw_command, resolvers, cr, Utility::EscapeShellCmd, commandObj->GetEscapeMacros()); -- 2.40.0