mirror of https://github.com/Icinga/icinga2.git
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:
commit
67dfefe036
|
@ -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());
|
||||
|
|
Loading…
Reference in New Issue