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

Take host state into account when sending suppressed notifications
This commit is contained in:
Alexander Aleksandrovič Klimov 2022-04-20 11:18:03 +02:00 committed by GitHub
commit 67dfefe036
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 0 deletions

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());