[icinga-checkins] icinga.org: icinga2/master: Fix that the first notification interval is incorrect

git at icinga.org git at icinga.org
Tue Aug 2 18:41:51 CEST 2016


Module: icinga2
Branch: master
Commit: 5498dc5e4fe8f732b4e3c92277dad75881419f51
URL:    https://git.icinga.org/?p=icinga2.git;a=commit;h=5498dc5e4fe8f732b4e3c92277dad75881419f51

Author: Michael Friedrich <michael.friedrich at netways.de>
Date:   Tue Aug  2 18:41:01 2016 +0200

Fix that the first notification interval is incorrect

fixes #12257

---

 lib/icinga/notification.cpp |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/icinga/notification.cpp b/lib/icinga/notification.cpp
index 804eb23..d989776 100644
--- a/lib/icinga/notification.cpp
+++ b/lib/icinga/notification.cpp
@@ -351,6 +351,10 @@ void Notification::BeginExecuteNotification(NotificationType type, const CheckRe
 		UpdateNotificationNumber();
 		double now = Utility::GetTime();
 		SetLastNotification(now);
+
+		if (type == NotificationProblem && GetInterval() > 0)
+			SetNextNotification(now + GetInterval());
+
 		if (type == NotificationProblem)
 			SetLastProblemNotification(now);
 	}



More information about the icinga-checkins mailing list