Fix problem with reminder notifications if the checkable is flapping

This commit is contained in:
Michael Friedrich 2018-05-09 09:54:48 +02:00
parent ce01adf018
commit 16e8e3cf4b
1 changed files with 2 additions and 1 deletions

View File

@ -119,13 +119,14 @@ void NotificationComponent::NotificationTimerHandler()
if ((service && service->GetState() == ServiceOK) || (!service && host->GetState() == HostUp))
continue;
if (!reachable || checkable->IsInDowntime() || checkable->IsAcknowledged())
if (!reachable || checkable->IsInDowntime() || checkable->IsAcknowledged() || checkable->IsFlapping())
continue;
}
try {
Log(LogNotice, "NotificationComponent")
<< "Attempting to send reminder notification '" << notification->GetName() << "'";
notification->BeginExecuteNotification(NotificationProblem, checkable->GetLastCheckResult(), false, true);
} catch (const std::exception& ex) {
Log(LogWarning, "NotificationComponent")