[icinga-checkins] icinga.org: icinga2/master: Make change to OK always a hard state

git at icinga.org git at icinga.org
Mon Jun 13 10:50:19 CEST 2016


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

Author: Markus Frosch <lazyfrosch at icinga.org>
Date:   Tue May 31 17:03:49 2016 +0200

Make change to OK always a hard state

refs #11654

---

 lib/icinga/checkable-check.cpp |    7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/lib/icinga/checkable-check.cpp b/lib/icinga/checkable-check.cpp
index f912e82..fc5e88e 100644
--- a/lib/icinga/checkable-check.cpp
+++ b/lib/icinga/checkable-check.cpp
@@ -180,13 +180,10 @@ void Checkable::ProcessCheckResult(const CheckResult::Ptr& cr, const MessageOrig
 	if (!old_cr) {
 		SetStateType(StateTypeHard);
 	} else if (IsStateOK(cr->GetState())) {
-		if (IsStateOK(old_state) && old_stateType == StateTypeSoft) {
-			SetStateType(StateTypeHard); // SOFT OK -> HARD OK
-			recovery = true;
-		}
+		SetStateType(StateTypeHard); // NOT-OK -> HARD OK
 
 		if (!IsStateOK(old_state))
-			recovery = true; // NOT OK -> SOFT/HARD OK
+			recovery = true;
 
 		ResetNotificationNumbers();
 		SaveLastState(ServiceOK, Utility::GetTime());



More information about the icinga-checkins mailing list