mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-27 23:54:07 +02:00
Fixed recovery notifications (again).
This commit is contained in:
parent
e98fd3e3eb
commit
a960237139
@ -254,11 +254,14 @@ void Service::ApplyCheckResult(const Dictionary::Ptr& cr)
|
|||||||
long attempt = GetCurrentCheckAttempt();
|
long attempt = GetCurrentCheckAttempt();
|
||||||
|
|
||||||
if (cr->Get("state") == StateOK) {
|
if (cr->Get("state") == StateOK) {
|
||||||
|
if (old_state != StateOK && old_stateType == StateTypeHard)
|
||||||
|
SetStateType(StateTypeSoft); // HARD NON-OK -> SOFT OK
|
||||||
|
|
||||||
if (old_state == StateOK && old_stateType == StateTypeSoft)
|
if (old_state == StateOK && old_stateType == StateTypeSoft)
|
||||||
hardChange = true; // hard recovery
|
hardChange = true; // SOFT OK -> HARD OK
|
||||||
|
|
||||||
if (old_state == StateOK || old_stateType == StateTypeSoft)
|
if (old_state == StateOK || old_stateType == StateTypeSoft)
|
||||||
SetStateType(StateTypeHard);
|
SetStateType(StateTypeHard); // SOFT OK -> HARD OK or SOFT NON-OK -> HARD OK
|
||||||
|
|
||||||
attempt = 1;
|
attempt = 1;
|
||||||
recovery = true;
|
recovery = true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user