Merge pull request #6292 from Icinga/fix/flapping-reminder-notification

Fix problem with reminder notifications if the checkable is flapping
This commit is contained in:
Noah Hilverling 2018-05-17 13:52:29 +02:00 committed by GitHub
commit a5a2194fa2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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)) 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")