IcingaCheckTask::ScriptFunc(): take CheckResultProducer::Ptr

This commit is contained in:
Alexander A. Klimov 2025-04-02 13:19:54 +02:00
parent 02f90908ee
commit dbc08502f5
2 changed files with 4 additions and 4 deletions

View File

@ -17,10 +17,10 @@
using namespace icinga;
REGISTER_FUNCTION_NONCONST(Internal, IcingaCheck, &IcingaCheckTask::ScriptFunc, "checkable:cr:resolvedMacros:useResolvedMacros");
REGISTER_FUNCTION_NONCONST(Internal, IcingaCheck, &IcingaCheckTask::ScriptFunc, "checkable:cr:producer:resolvedMacros:useResolvedMacros");
void IcingaCheckTask::ScriptFunc(const Checkable::Ptr& checkable, const CheckResult::Ptr& cr,
const Dictionary::Ptr& resolvedMacros, bool useResolvedMacros)
const CheckResultProducer::Ptr& producer, const Dictionary::Ptr& resolvedMacros, bool useResolvedMacros)
{
REQUIRE_NOT_NULL(checkable);
REQUIRE_NOT_NULL(cr);
@ -204,6 +204,6 @@ void IcingaCheckTask::ScriptFunc(const Checkable::Ptr& checkable, const CheckRes
cr->SetOutput(output);
cr->SetCommand(commandName);
checkable->ProcessCheckResult(cr);
checkable->ProcessCheckResult(cr, producer);
}
}

View File

@ -18,7 +18,7 @@ class IcingaCheckTask
{
public:
static void ScriptFunc(const Checkable::Ptr& checkable, const CheckResult::Ptr& cr,
const Dictionary::Ptr& resolvedMacros, bool useResolvedMacros);
const CheckResultProducer::Ptr& producer, const Dictionary::Ptr& resolvedMacros, bool useResolvedMacros);
private:
IcingaCheckTask();