]> granicus.if.org Git - icinga2/commitdiff
Don't send notifications for the initial state change.
authorGunnar Beutner <gunnar.beutner@netways.de>
Mon, 10 Mar 2014 12:54:16 +0000 (13:54 +0100)
committerGunnar Beutner <gunnar.beutner@netways.de>
Mon, 10 Mar 2014 12:54:16 +0000 (13:54 +0100)
Fixes #5736

lib/icinga/service-check.cpp

index fd5ac59c1bb643d2a9f2e42f59eee96f6585e8c0..1130fbbe91a095bac2e4f731b92b3ba08d13f083 100644 (file)
@@ -361,6 +361,9 @@ void Service::ProcessCheckResult(const CheckResult::Ptr& cr, const String& autho
        bool in_downtime = IsInDowntime();
        bool send_notification = hardChange && notification_reachable && !in_downtime && !IsAcknowledged();
 
+       if (!old_cr)
+               send_notification = false; /* Don't send notifications for the initial state change */
+
        if (old_state == StateOK && old_stateType == StateTypeSoft)
                send_notification = false; /* Don't send notifications for SOFT-OK -> HARD-OK. */