[icinga-checkins] icinga.org: icinga2/master: Fix another bug related to recovery notifications.

git at icinga.org git at icinga.org
Wed Mar 20 16:27:54 CET 2013


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

Author: Gunnar Beutner <gunnar.beutner at netways.de>
Date:   Wed Mar 20 16:27:38 2013 +0100

Fix another bug related to recovery notifications.

---

 lib/icinga/service-check.cpp |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/lib/icinga/service-check.cpp b/lib/icinga/service-check.cpp
index e0e9948..0e92ede 100644
--- a/lib/icinga/service-check.cpp
+++ b/lib/icinga/service-check.cpp
@@ -516,6 +516,9 @@ void Service::ProcessCheckResult(const Dictionary::Ptr& cr)
 	if (old_state == StateOK && old_stateType == StateTypeSoft)
 		send_notification = false; /* Don't send notifications for SOFT-OK -> HARD-OK. */
 
+	if (old_state != StateOK && GetState() == StateOK && old_stateType == StateTypeHard && GetState() == StateTypeHard)
+		send_notification = true; /* Send notifications for hard recoveries. (HARD-NON-OK -> HARD-OK) */
+
 	bool send_downtime_notification = m_LastInDowntime != in_downtime;
 	m_LastInDowntime = in_downtime;
 	Touch("last_in_downtime");





More information about the icinga-checkins mailing list