mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-23 13:45:04 +02:00
Fix macro priority.
This commit is contained in:
parent
de4e2c6585
commit
f260f5e73b
@ -41,9 +41,9 @@ Dictionary::Ptr PluginCheckTask::ScriptFunc(const Service::Ptr& service)
|
||||
Value raw_command = commandObj->GetCommandLine();
|
||||
|
||||
std::vector<MacroResolver::Ptr> 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());
|
||||
|
@ -39,9 +39,9 @@ void PluginEventTask::ScriptFunc(const Service::Ptr& service)
|
||||
Value raw_command = commandObj->GetCommandLine();
|
||||
|
||||
std::vector<MacroResolver::Ptr> 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());
|
||||
|
@ -50,10 +50,10 @@ void PluginNotificationTask::ScriptFunc(const Notification::Ptr& notification, c
|
||||
std::vector<MacroResolver::Ptr> 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());
|
||||
|
Loading…
x
Reference in New Issue
Block a user