mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-27 15:44:11 +02:00
livestatus: Fix macro priority.
This commit is contained in:
parent
f260f5e73b
commit
93b3461f7c
@ -234,9 +234,9 @@ Value HostsTable::CheckCommandExpandedAccessor(const Value& row)
|
|||||||
Value raw_command = commandObj->GetCommandLine();
|
Value raw_command = commandObj->GetCommandLine();
|
||||||
|
|
||||||
std::vector<MacroResolver::Ptr> resolvers;
|
std::vector<MacroResolver::Ptr> resolvers;
|
||||||
resolvers.push_back(commandObj);
|
|
||||||
resolvers.push_back(hc);
|
resolvers.push_back(hc);
|
||||||
resolvers.push_back(host);
|
resolvers.push_back(host);
|
||||||
|
resolvers.push_back(commandObj);
|
||||||
resolvers.push_back(IcingaApplication::GetInstance());
|
resolvers.push_back(IcingaApplication::GetInstance());
|
||||||
|
|
||||||
Value commandLine = MacroProcessor::ResolveMacros(raw_command, resolvers, Dictionary::Ptr(), Utility::EscapeShellCmd);
|
Value commandLine = MacroProcessor::ResolveMacros(raw_command, resolvers, Dictionary::Ptr(), Utility::EscapeShellCmd);
|
||||||
|
@ -185,9 +185,9 @@ Value ServicesTable::CheckCommandExpandedAccessor(const Value& row)
|
|||||||
Value raw_command = commandObj->GetCommandLine();
|
Value raw_command = commandObj->GetCommandLine();
|
||||||
|
|
||||||
std::vector<MacroResolver::Ptr> resolvers;
|
std::vector<MacroResolver::Ptr> resolvers;
|
||||||
resolvers.push_back(commandObj);
|
|
||||||
resolvers.push_back(service);
|
resolvers.push_back(service);
|
||||||
resolvers.push_back(service->GetHost());
|
resolvers.push_back(service->GetHost());
|
||||||
|
resolvers.push_back(commandObj);
|
||||||
resolvers.push_back(IcingaApplication::GetInstance());
|
resolvers.push_back(IcingaApplication::GetInstance());
|
||||||
|
|
||||||
Value commandLine = MacroProcessor::ResolveMacros(raw_command, resolvers, Dictionary::Ptr(), Utility::EscapeShellCmd);
|
Value commandLine = MacroProcessor::ResolveMacros(raw_command, resolvers, Dictionary::Ptr(), Utility::EscapeShellCmd);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user