FireSuppressedNotifications(const Notification::Ptr&): don't send notifications while suppressed by checkable

... e.g. if a notification enters its time period (not suppressed anymore),
but its checkable has entered a downtime (suppressed).

refs #8509
This commit is contained in:
Alexander A. Klimov 2020-12-14 13:28:53 +01:00
parent 5547488cd5
commit f04387a973

View File

@ -91,7 +91,7 @@ void FireSuppressedNotifications(const Notification::Ptr& notification)
if ((!tp || tp->IsInside(Utility::GetTime())) && !checkable->IsLikelyToBeCheckedSoon()) {
for (auto type : {NotificationProblem, NotificationRecovery, NotificationFlappingStart, NotificationFlappingEnd}) {
if (!(suppressedTypes & type))
if (!(suppressedTypes & type) || checkable->NotificationReasonSuppressed(type))
continue;
auto notificationName (notification->GetName());