mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-23 13:45:04 +02:00
Fix problem notifications while flapping is active
fixes #9969 fixes #9642
This commit is contained in:
parent
071c43c4da
commit
f5f0f7bd6e
@ -346,6 +346,7 @@ void Checkable::ProcessCheckResult(const CheckResult::Ptr& cr, const MessageOrig
|
|||||||
if (send_downtime_notification)
|
if (send_downtime_notification)
|
||||||
OnNotificationsRequested(this, in_downtime ? NotificationDowntimeStart : NotificationDowntimeEnd, cr, "", "");
|
OnNotificationsRequested(this, in_downtime ? NotificationDowntimeStart : NotificationDowntimeEnd, cr, "", "");
|
||||||
|
|
||||||
|
if (send_notification) {
|
||||||
if (!was_flapping && is_flapping) {
|
if (!was_flapping && is_flapping) {
|
||||||
OnNotificationsRequested(this, NotificationFlappingStart, cr, "", "");
|
OnNotificationsRequested(this, NotificationFlappingStart, cr, "", "");
|
||||||
|
|
||||||
@ -360,8 +361,9 @@ void Checkable::ProcessCheckResult(const CheckResult::Ptr& cr, const MessageOrig
|
|||||||
<< "Flapping: Checkable " << GetName() << " stopped flapping (" << GetFlappingThreshold() << "% >= " << GetFlappingCurrent() << "%).";
|
<< "Flapping: Checkable " << GetName() << " stopped flapping (" << GetFlappingThreshold() << "% >= " << GetFlappingCurrent() << "%).";
|
||||||
|
|
||||||
NotifyFlapping(origin);
|
NotifyFlapping(origin);
|
||||||
} else if (send_notification)
|
} else if (!was_flapping && !is_flapping)
|
||||||
OnNotificationsRequested(this, recovery ? NotificationRecovery : NotificationProblem, cr, "", "");
|
OnNotificationsRequested(this, recovery ? NotificationRecovery : NotificationProblem, cr, "", "");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Checkable::ExecuteRemoteCheck(const Dictionary::Ptr& resolvedMacros)
|
void Checkable::ExecuteRemoteCheck(const Dictionary::Ptr& resolvedMacros)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user