mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-06 21:34:28 +02:00
More bugfixes for notifications.
This commit is contained in:
parent
e60c04f4bd
commit
db8ac1431c
@ -502,6 +502,9 @@ void Service::ProcessCheckResult(const Dictionary::Ptr& cr)
|
|||||||
|
|
||||||
bool hardChange = (GetStateType() == StateTypeHard && old_stateType == StateTypeSoft);
|
bool hardChange = (GetStateType() == StateTypeHard && old_stateType == StateTypeSoft);
|
||||||
|
|
||||||
|
if (old_state != GetState() && old_stateType == StateTypeHard && GetStateType() == StateTypeHard)
|
||||||
|
hardChange = true;
|
||||||
|
|
||||||
if (hardChange)
|
if (hardChange)
|
||||||
SetLastHardStateChange(now);
|
SetLastHardStateChange(now);
|
||||||
|
|
||||||
@ -516,9 +519,6 @@ void Service::ProcessCheckResult(const Dictionary::Ptr& cr)
|
|||||||
if (old_state == StateOK && old_stateType == StateTypeSoft)
|
if (old_state == StateOK && old_stateType == StateTypeSoft)
|
||||||
send_notification = false; /* Don't send notifications for SOFT-OK -> HARD-OK. */
|
send_notification = false; /* Don't send notifications for SOFT-OK -> HARD-OK. */
|
||||||
|
|
||||||
if (old_state != StateOK && GetState() == StateOK && old_stateType == StateTypeHard && GetState() == StateTypeHard)
|
|
||||||
send_notification = true; /* Send notifications for hard recoveries. (HARD-NON-OK -> HARD-OK) */
|
|
||||||
|
|
||||||
bool send_downtime_notification = m_LastInDowntime != in_downtime;
|
bool send_downtime_notification = m_LastInDowntime != in_downtime;
|
||||||
m_LastInDowntime = in_downtime;
|
m_LastInDowntime = in_downtime;
|
||||||
Touch("last_in_downtime");
|
Touch("last_in_downtime");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user