[icinga-checkins] icinga.org: icinga2/master: Fix that recovery notifications are sent in SOFT NOT-OK states

git at icinga.org git at icinga.org
Tue Aug 23 15:01:52 CEST 2016


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

Author: Michael Friedrich <michael.friedrich at netways.de>
Date:   Tue Aug 23 14:35:59 2016 +0200

Fix that recovery notifications are sent in SOFT NOT-OK states

fixes #12517

---

 lib/icinga/checkable-check.cpp |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/icinga/checkable-check.cpp b/lib/icinga/checkable-check.cpp
index 9080d67..a064a80 100644
--- a/lib/icinga/checkable-check.cpp
+++ b/lib/icinga/checkable-check.cpp
@@ -183,7 +183,7 @@ void Checkable::ProcessCheckResult(const CheckResult::Ptr& cr, const MessageOrig
 	if (IsStateOK(cr->GetState())) {
 		SetStateType(StateTypeHard); // NOT-OK -> HARD OK
 
-		if (!IsStateOK(old_state))
+		if (old_stateType == StateTypeHard && !IsStateOK(old_state))
 			recovery = true;
 
 		ResetNotificationNumbers();



More information about the icinga-checkins mailing list