From: Gunnar Beutner Date: Mon, 10 Mar 2014 12:54:16 +0000 (+0100) Subject: Don't send notifications for the initial state change. X-Git-Tag: v0.0.8~10 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a124bed5c0beb1eb8440211b0b2bc1b31f025821;p=icinga2 Don't send notifications for the initial state change. Fixes #5736 --- diff --git a/lib/icinga/service-check.cpp b/lib/icinga/service-check.cpp index fd5ac59c1..1130fbbe9 100644 --- a/lib/icinga/service-check.cpp +++ b/lib/icinga/service-check.cpp @@ -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. */