From a124bed5c0beb1eb8440211b0b2bc1b31f025821 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Mon, 10 Mar 2014 13:54:16 +0100 Subject: [PATCH] Don't send notifications for the initial state change. Fixes #5736 --- lib/icinga/service-check.cpp | 3 +++ 1 file changed, 3 insertions(+) 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. */ -- 2.40.0