mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-25 22:54:57 +02:00
IcingaCheckTask::ScriptFunc(): take CheckResultProducer::Ptr
This commit is contained in:
parent
02f90908ee
commit
dbc08502f5
@ -17,10 +17,10 @@
|
|||||||
|
|
||||||
using namespace icinga;
|
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,
|
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(checkable);
|
||||||
REQUIRE_NOT_NULL(cr);
|
REQUIRE_NOT_NULL(cr);
|
||||||
@ -204,6 +204,6 @@ void IcingaCheckTask::ScriptFunc(const Checkable::Ptr& checkable, const CheckRes
|
|||||||
cr->SetOutput(output);
|
cr->SetOutput(output);
|
||||||
cr->SetCommand(commandName);
|
cr->SetCommand(commandName);
|
||||||
|
|
||||||
checkable->ProcessCheckResult(cr);
|
checkable->ProcessCheckResult(cr, producer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -18,7 +18,7 @@ class IcingaCheckTask
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
static void ScriptFunc(const Checkable::Ptr& checkable, const CheckResult::Ptr& cr,
|
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:
|
private:
|
||||||
IcingaCheckTask();
|
IcingaCheckTask();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user