mirror of https://github.com/Icinga/icinga2.git
Merge pull request #9598 from Icinga/9596
CheckerComponent#CheckThreadProc(): also propagate next check update …
This commit is contained in:
commit
a0239e44f7
|
@ -134,12 +134,15 @@ void CheckerComponent::CheckThreadProc()
|
|||
|
||||
bool forced = checkable->GetForceNextCheck();
|
||||
bool check = true;
|
||||
bool notifyNextCheck = false;
|
||||
|
||||
if (!forced) {
|
||||
if (!checkable->IsReachable(DependencyCheckExecution)) {
|
||||
Log(LogNotice, "CheckerComponent")
|
||||
<< "Skipping check for object '" << checkable->GetName() << "': Dependency failed.";
|
||||
|
||||
check = false;
|
||||
notifyNextCheck = true;
|
||||
}
|
||||
|
||||
Host::Ptr host;
|
||||
|
@ -163,7 +166,9 @@ void CheckerComponent::CheckThreadProc()
|
|||
Log(LogNotice, "CheckerComponent")
|
||||
<< "Skipping check for object '" << checkable->GetName()
|
||||
<< "': not in check period '" << tp->GetName() << "'";
|
||||
|
||||
check = false;
|
||||
notifyNextCheck = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -177,6 +182,11 @@ void CheckerComponent::CheckThreadProc()
|
|||
|
||||
checkable->UpdateNextCheck();
|
||||
|
||||
if (notifyNextCheck) {
|
||||
// Trigger update event for Icinga DB
|
||||
Checkable::OnNextCheckUpdated(checkable);
|
||||
}
|
||||
|
||||
lock.lock();
|
||||
|
||||
continue;
|
||||
|
|
Loading…
Reference in New Issue