mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-27 07:34:15 +02:00
On recovery: re-check children
This commit is contained in:
parent
3c15e71e19
commit
4b0313d3f3
@ -242,6 +242,20 @@ void Checkable::ProcessCheckResult(const CheckResult::Ptr& cr, const MessageOrig
|
|||||||
OnReachabilityChanged(this, cr, children, origin);
|
OnReachabilityChanged(this, cr, children, origin);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (recovery) {
|
||||||
|
for (auto& child : children) {
|
||||||
|
if (child->GetProblem() && child->GetEnableActiveChecks()) {
|
||||||
|
auto nextCheck (now + Utility::Random() % 60);
|
||||||
|
|
||||||
|
ObjectLock oLock (child);
|
||||||
|
|
||||||
|
if (nextCheck < child->GetNextCheck()) {
|
||||||
|
child->SetNextCheck(nextCheck);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!reachable)
|
if (!reachable)
|
||||||
SetLastStateUnreachable(Utility::GetTime());
|
SetLastStateUnreachable(Utility::GetTime());
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user