mirror of https://github.com/Icinga/icinga2.git
Fix problem with reminder notifications if the checkable is flapping
This commit is contained in:
parent
ce01adf018
commit
16e8e3cf4b
|
@ -119,13 +119,14 @@ void NotificationComponent::NotificationTimerHandler()
|
||||||
if ((service && service->GetState() == ServiceOK) || (!service && host->GetState() == HostUp))
|
if ((service && service->GetState() == ServiceOK) || (!service && host->GetState() == HostUp))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (!reachable || checkable->IsInDowntime() || checkable->IsAcknowledged())
|
if (!reachable || checkable->IsInDowntime() || checkable->IsAcknowledged() || checkable->IsFlapping())
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
Log(LogNotice, "NotificationComponent")
|
Log(LogNotice, "NotificationComponent")
|
||||||
<< "Attempting to send reminder notification '" << notification->GetName() << "'";
|
<< "Attempting to send reminder notification '" << notification->GetName() << "'";
|
||||||
|
|
||||||
notification->BeginExecuteNotification(NotificationProblem, checkable->GetLastCheckResult(), false, true);
|
notification->BeginExecuteNotification(NotificationProblem, checkable->GetLastCheckResult(), false, true);
|
||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
Log(LogWarning, "NotificationComponent")
|
Log(LogWarning, "NotificationComponent")
|
||||||
|
|
Loading…
Reference in New Issue