mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-29 08:34:20 +02:00
RandomCheckTask::ScriptFunc(): take CheckResultProducer::Ptr
This commit is contained in:
parent
a14ac3f41e
commit
4a553a9fff
@ -13,10 +13,10 @@
|
|||||||
|
|
||||||
using namespace icinga;
|
using namespace icinga;
|
||||||
|
|
||||||
REGISTER_FUNCTION_NONCONST(Internal, RandomCheck, &RandomCheckTask::ScriptFunc, "checkable:cr:resolvedMacros:useResolvedMacros");
|
REGISTER_FUNCTION_NONCONST(Internal, RandomCheck, &RandomCheckTask::ScriptFunc, "checkable:cr:producer:resolvedMacros:useResolvedMacros");
|
||||||
|
|
||||||
void RandomCheckTask::ScriptFunc(const Checkable::Ptr& checkable, const CheckResult::Ptr& cr,
|
void RandomCheckTask::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);
|
||||||
@ -60,6 +60,6 @@ void RandomCheckTask::ScriptFunc(const Checkable::Ptr& checkable, const CheckRes
|
|||||||
cr->SetState(state);
|
cr->SetState(state);
|
||||||
cr->SetCommand(commandName);
|
cr->SetCommand(commandName);
|
||||||
|
|
||||||
checkable->ProcessCheckResult(cr);
|
checkable->ProcessCheckResult(cr, producer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -18,7 +18,7 @@ class RandomCheckTask
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
static void ScriptFunc(const Checkable::Ptr& service, const CheckResult::Ptr& cr,
|
static void ScriptFunc(const Checkable::Ptr& service, const CheckResult::Ptr& cr,
|
||||||
const Dictionary::Ptr& resolvedMacros, bool useResolvedMacros);
|
const CheckResultProducer::Ptr& producer, const Dictionary::Ptr& resolvedMacros, bool useResolvedMacros);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
RandomCheckTask();
|
RandomCheckTask();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user