mirror of https://github.com/Icinga/icinga2.git
Fix $ido_name$ macro when using the IDO check type with command_endpoint
fixes #12428
This commit is contained in:
parent
4a3b33e3f5
commit
c6e5f3dcb8
|
@ -55,6 +55,9 @@ void IdoCheckTask::ScriptFunc(const Checkable::Ptr& checkable, const CheckResult
|
|||
String idoType = MacroProcessor::ResolveMacros("$ido_type$", resolvers, checkable->GetLastCheckResult(),
|
||||
NULL, MacroProcessor::EscapeCallback(), resolvedMacros, useResolvedMacros);
|
||||
|
||||
String idoName = MacroProcessor::ResolveMacros("$ido_name$", resolvers, checkable->GetLastCheckResult(),
|
||||
NULL, MacroProcessor::EscapeCallback(), resolvedMacros, useResolvedMacros);
|
||||
|
||||
if (resolvedMacros && !useResolvedMacros)
|
||||
return;
|
||||
|
||||
|
@ -65,12 +68,6 @@ void IdoCheckTask::ScriptFunc(const Checkable::Ptr& checkable, const CheckResult
|
|||
return;
|
||||
}
|
||||
|
||||
String idoName = MacroProcessor::ResolveMacros("$ido_name$", resolvers, checkable->GetLastCheckResult(),
|
||||
NULL, MacroProcessor::EscapeCallback(), resolvedMacros, useResolvedMacros);
|
||||
|
||||
if (resolvedMacros && !useResolvedMacros)
|
||||
return;
|
||||
|
||||
if (idoName.IsEmpty()) {
|
||||
cr->SetOutput("Macro 'ido_name' must be set.");
|
||||
cr->SetState(ServiceUnknown);
|
||||
|
|
Loading…
Reference in New Issue