Merge pull request #9356 from Icinga/bugfix/suppressed-notifications-host-dependency-2.13

Take host state into account when sending suppressed notifications
This commit is contained in:
Julian Brost 2022-06-14 14:25:45 +02:00 committed by GitHub
commit 7e93de2ec5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -155,6 +155,17 @@ void Checkable::FireSuppressedNotifications()
}
auto threshold (cr->GetExecutionStart());
Host::Ptr host;
Service::Ptr service;
tie(host, service) = GetHostService(this);
if (service) {
ObjectLock oLock (host);
if (!host->GetProblem() && host->GetLastStateChange() >= threshold) {
return true;
}
}
for (auto& dep : GetDependencies()) {
auto parent (dep->GetParent());