Skip to content

Commit

Permalink
Merge pull request #9348 from Icinga/bugfix/suppressed-notifications-…
Browse files Browse the repository at this point in the history
…host-dependency

Take host state into account when sending suppressed notifications
  • Loading branch information
Al2Klimov authored Apr 20, 2022
2 parents 9644eff + 51cd7e7 commit 67dfefe
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions lib/icinga/checkable-notification.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down

0 comments on commit 67dfefe

Please sign in to comment.