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

git at icinga.org git at icinga.org
Mon Jun 13 08:52:44 CEST 2016


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

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

WIP: 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