diff --git a/lib/icinga/pluginutility.cpp b/lib/icinga/pluginutility.cpp index 8ce301ac8..15189f7b9 100644 --- a/lib/icinga/pluginutility.cpp +++ b/lib/icinga/pluginutility.cpp @@ -70,10 +70,17 @@ void PluginUtility::ExecuteCommand(const Command::Ptr& commandObj, const Checkab for (const Dictionary::Pair& kv : env) { String name = kv.second; + String missingMacro; Value value = MacroProcessor::ResolveMacros(name, macroResolvers, cr, - nullptr, MacroProcessor::EscapeCallback(), resolvedMacros, + &missingMacro, MacroProcessor::EscapeCallback(), resolvedMacros, useResolvedMacros); +#ifdef I2_DEBUG + if (!missingMacro.IsEmpty()) + Log(LogDebug, "PluginUtility") + << "Macro '" << name << "' is not defined."; +#endif /* I2_DEBUG */ + if (value.IsObjectType()) value = Utility::Join(value, ';');