mirror of https://github.com/Icinga/icinga2.git
Only send acknowledgement notification if user received a problem notification
refs #6047
This commit is contained in:
parent
0ef6084d1c
commit
bfe7d46a68
|
@ -409,6 +409,15 @@ void Notification::BeginExecuteNotification(NotificationType type, const CheckRe
|
|||
}
|
||||
}
|
||||
|
||||
/* on acknowledgement, check if user was notified before */
|
||||
if (type == NotificationAcknowledgement) {
|
||||
if (!notifiedProblemUsers->Contains(userName)) {
|
||||
Log(LogNotice, "Notification")
|
||||
<< "We did not notify user '" << userName << "' for a problem before. Not sending acknowledgement notification.";
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
Log(LogInformation, "Notification")
|
||||
<< "Sending " << (reminder ? "reminder " : "") << "'" << NotificationTypeToStringInternal(type) << "' notification '"
|
||||
<< GetName() << "' for user '" << userName << "'";
|
||||
|
|
Loading…
Reference in New Issue