Don't send notifications for the initial state change.

Fixes #5736
This commit is contained in:
Gunnar Beutner 2014-03-10 13:54:16 +01:00
parent e693486dae
commit a124bed5c0
1 changed files with 3 additions and 0 deletions

View 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. */