mirror of https://github.com/Icinga/icinga2.git
Bug fix for reminder notifications.
This commit is contained in:
parent
db064d3ce9
commit
f5c77463b1
|
@ -78,6 +78,8 @@ void NotificationComponent::NotificationTimerHandler(void)
|
||||||
Service::Ptr service = notification->GetService();
|
Service::Ptr service = notification->GetService();
|
||||||
bool reachable = service->IsReachable();
|
bool reachable = service->IsReachable();
|
||||||
|
|
||||||
|
notification->SetNextNotification(Utility::GetTime() + notification->GetNotificationInterval());
|
||||||
|
|
||||||
bool send_notification;
|
bool send_notification;
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@ -89,13 +91,9 @@ void NotificationComponent::NotificationTimerHandler(void)
|
||||||
if (service->GetState() == StateOK)
|
if (service->GetState() == StateOK)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
send_notification = reachable && !service->IsInDowntime() && !service->IsAcknowledged();
|
if (!reachable || service->IsInDowntime() || service->IsAcknowledged())
|
||||||
}
|
|
||||||
|
|
||||||
notification->SetNextNotification(Utility::GetTime() + notification->GetNotificationInterval());
|
|
||||||
|
|
||||||
if (!send_notification)
|
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
Log(LogInformation, "notification", "Sending reminder notification for service '" + service->GetName() + "'");
|
Log(LogInformation, "notification", "Sending reminder notification for service '" + service->GetName() + "'");
|
||||||
|
|
Loading…
Reference in New Issue