Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix lost recovery notifications after recovery outside of notification time period #10187

Merged
merged 1 commit into from
Oct 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/icinga/checkable-notification.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ void Checkable::FireSuppressedNotifications()
* If any of these conditions is not met, processing the suppressed notification is further delayed.
*/
if (!state_suppressed && GetStateType() == StateTypeHard && !IsLikelyToBeCheckedSoon() && !wasLastParentRecoveryRecent.Get()) {
if (NotificationReasonApplies(type)) {
if (cr->GetState() != GetStateBeforeSuppression()) {
Al2Klimov marked this conversation as resolved.
Show resolved Hide resolved
Checkable::OnNotificationsRequested(this, type, cr, "", "", nullptr);
}
subtract |= NotificationRecovery|NotificationProblem;
Expand Down Expand Up @@ -266,12 +266,12 @@ bool Checkable::NotificationReasonApplies(NotificationType type)
case NotificationProblem:
{
auto cr (GetLastCheckResult());
return cr && !IsStateOK(cr->GetState()) && cr->GetState() != GetStateBeforeSuppression();
return cr && !IsStateOK(cr->GetState());
}
case NotificationRecovery:
{
auto cr (GetLastCheckResult());
return cr && IsStateOK(cr->GetState()) && cr->GetState() != GetStateBeforeSuppression();
return cr && IsStateOK(cr->GetState());
Al2Klimov marked this conversation as resolved.
Show resolved Hide resolved
Al2Klimov marked this conversation as resolved.
Show resolved Hide resolved
}
case NotificationFlappingStart:
return IsFlapping();
Al2Klimov marked this conversation as resolved.
Show resolved Hide resolved
Expand Down
Loading