Only check escalations for problem notifications.

This commit is contained in:
Gunnar Beutner 2013-07-19 11:02:43 +02:00
parent dfda90f744
commit 511b052105
1 changed files with 9 additions and 7 deletions

View File

@ -271,6 +271,7 @@ void Notification::BeginExecuteNotification(NotificationType type, const Diction
Dictionary::Ptr times = GetTimes();
Service::Ptr service = GetService();
if (type == NotificationProblem) {
if (times && times->Contains("begin") && now < service->GetLastHardStateChange() + times->Get("begin")) {
Log(LogInformation, "icinga", "Not sending notifications for notification object '" + GetName() + "': before escalation range");
return;
@ -280,6 +281,7 @@ void Notification::BeginExecuteNotification(NotificationType type, const Diction
Log(LogInformation, "icinga", "Not sending notifications for notification object '" + GetName() + "': after escalation range");
return;
}
}
unsigned long ftype = 1 << type;