You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Created by mfriedrich on 2016-07-15 11:08:57 +00:00
Assignee: mfriedrich
Status: Closed (closed on 2016-08-04 10:06:23 +00:00)
Target Version: 2.5.0
Last Update: 2016-08-04 10:06:23 +00:00 (in Redmine)
Icinga Version: 2.4.10
Backport?: Not yet backported
Include in Changelog: 0
This patch always sets the state type to HARD when a check result with an OK state is received. It does not check whether a state change was performed or not (e.g. previously NOT-OK -> OK transition).
This could lead into unexpected behaviour with volatile notifications (GetStateType() is called and evaluated afterwards).
Requires tests before the 2.5 release.
michi@mbmif ~/coding/icinga/icinga2 (master) $ git show 8808e709c9f3e83f5dd9098f0282c6cafdb6b9ce
commit 8808e709c9f3e83f5dd9098f0282c6cafdb6b9ce
Author: Markus Frosch
Date: Tue May 31 17:03:49 2016 +0200
Make change to OK always a hard state
refs #11654
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());
This issue has been migrated from Redmine: https://dev.icinga.com/issues/12156
Created by mfriedrich on 2016-07-15 11:08:57 +00:00
Assignee: mfriedrich
Status: Closed (closed on 2016-08-04 10:06:23 +00:00)
Target Version: 2.5.0
Last Update: 2016-08-04 10:06:23 +00:00 (in Redmine)
This patch always sets the state type to HARD when a check result with an OK state is received. It does not check whether a state change was performed or not (e.g. previously NOT-OK -> OK transition).
This could lead into unexpected behaviour with volatile notifications (GetStateType() is called and evaluated afterwards).
Requires tests before the 2.5 release.
Relations:
The text was updated successfully, but these errors were encountered: