mirror of
https://github.com/Icinga/icinga2.git
synced 2025-04-08 17:05:25 +02:00
Ensure to send recovery notifications if the was a problem notification before a downtime
fixes #12293
This commit is contained in:
parent
83f07c7ee2
commit
34655d77d3
@ -389,10 +389,17 @@ void Checkable::ProcessCheckResult(const CheckResult::Ptr& cr, const MessageOrig
|
||||
NotifyFlapping(origin);
|
||||
}
|
||||
|
||||
/* Problem notifications */
|
||||
if (send_notification && !is_flapping) {
|
||||
if (recovery) {
|
||||
/* Recovery notifications must be sent any time.
|
||||
* Users who where notified about a problem before
|
||||
* will be filtered when processing the notification.
|
||||
*/
|
||||
if (!IsPaused())
|
||||
OnNotificationsRequested(this, recovery ? NotificationRecovery : NotificationProblem, cr, "", "", MessageOrigin::Ptr());
|
||||
OnNotificationsRequested(this, NotificationRecovery, cr, "", "", MessageOrigin::Ptr());
|
||||
} else if (send_notification && !is_flapping) {
|
||||
/* Problem notifications */
|
||||
if (!IsPaused())
|
||||
OnNotificationsRequested(this, NotificationProblem, cr, "", "", MessageOrigin::Ptr());
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user