mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-31 01:24:19 +02:00
Only check escalations for problem notifications.
This commit is contained in:
parent
dfda90f744
commit
511b052105
@ -271,14 +271,16 @@ void Notification::BeginExecuteNotification(NotificationType type, const Diction
|
|||||||
Dictionary::Ptr times = GetTimes();
|
Dictionary::Ptr times = GetTimes();
|
||||||
Service::Ptr service = GetService();
|
Service::Ptr service = GetService();
|
||||||
|
|
||||||
if (times && times->Contains("begin") && now < service->GetLastHardStateChange() + times->Get("begin")) {
|
if (type == NotificationProblem) {
|
||||||
Log(LogInformation, "icinga", "Not sending notifications for notification object '" + GetName() + "': before escalation range");
|
if (times && times->Contains("begin") && now < service->GetLastHardStateChange() + times->Get("begin")) {
|
||||||
return;
|
Log(LogInformation, "icinga", "Not sending notifications for notification object '" + GetName() + "': before escalation range");
|
||||||
}
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (times && times->Contains("end") && now > service->GetLastHardStateChange() + times->Get("end")) {
|
if (times && times->Contains("end") && now > service->GetLastHardStateChange() + times->Get("end")) {
|
||||||
Log(LogInformation, "icinga", "Not sending notifications for notification object '" + GetName() + "': after escalation range");
|
Log(LogInformation, "icinga", "Not sending notifications for notification object '" + GetName() + "': after escalation range");
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned long ftype = 1 << type;
|
unsigned long ftype = 1 << type;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user