]> granicus.if.org Git - icinga2/commitdiff
Fix another bug related to recovery notifications.
authorGunnar Beutner <gunnar.beutner@netways.de>
Wed, 20 Mar 2013 15:27:38 +0000 (16:27 +0100)
committerGunnar Beutner <gunnar.beutner@netways.de>
Wed, 20 Mar 2013 15:27:38 +0000 (16:27 +0100)
lib/icinga/service-check.cpp

index e0e9948f66bcda5c1e884a25eed523d9a844b8fd..0e92ede35c4be157f3301bab057f6309cf0d97bb 100644 (file)
@@ -516,6 +516,9 @@ void Service::ProcessCheckResult(const Dictionary::Ptr& cr)
        if (old_state == StateOK && old_stateType == StateTypeSoft)
                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;
        m_LastInDowntime = in_downtime;
        Touch("last_in_downtime");