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

check global enable_flap_detection flag for notifications #452

Merged
merged 1 commit into from
Feb 8, 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
4 changes: 2 additions & 2 deletions src/naemon/notifications.c
Original file line number Diff line number Diff line change
Expand Up @@ -794,7 +794,7 @@ int check_service_notification_viability(service *svc, int type, int options)
}

/* if this service is currently flapping, don't send the notification */
if (svc->is_flapping == TRUE) {
if (enable_flap_detection == TRUE && svc->flap_detection_enabled == TRUE && svc->is_flapping == TRUE) {
LOG_SERVICE_NSR(NSR_IS_FLAPPING);
return ERROR;
}
Expand Down Expand Up @@ -1654,7 +1654,7 @@ int check_host_notification_viability(host *hst, int type, int options)
}

/* if this host is currently flapping, don't send the notification */
if (hst->is_flapping == TRUE) {
if (enable_flap_detection == TRUE && hst->flap_detection_enabled == TRUE && hst->is_flapping == TRUE) {
LOG_HOST_NSR(NSR_IS_FLAPPING);
return ERROR;
}
Expand Down
Loading