Skip to content

Commit

Permalink
Fixes issue where current_notification_number and notified_on being r…
Browse files Browse the repository at this point in the history
…eset to 0 for services when they recover. This caused recovery emails to be sent when a initial notification wasn't sent. Fixes #572 -SW
  • Loading branch information
Scott Wilkerson committed Nov 2, 2018
1 parent 5c98458 commit f86598e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions base/checks.c
Expand Up @@ -1572,6 +1572,12 @@ int handle_async_service_check_result(service *svc, check_result *cr)
}
}

/* the service recovered, so reset the current notification number and state flags (after the recovery notification has gone out) */
if(svc->current_state == STATE_OK && svc->state_type == HARD_STATE && hard_state_change == TRUE) {
svc->current_notification_number = 0;
svc->notified_on = 0;
}

if (obsess_over_services == TRUE) {
obsessive_compulsive_service_check_processor(svc);
}
Expand Down

0 comments on commit f86598e

Please sign in to comment.