Skip to content
This repository has been archived by the owner on Jan 15, 2019. It is now read-only.

Commit

Permalink
scheduled downtime can now start on SOFT error states
Browse files Browse the repository at this point in the history
fixes #687
  • Loading branch information
Michael Friedrich committed Aug 6, 2010
1 parent 3f0bdad commit 1613b2a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
1 change: 1 addition & 0 deletions Changelog
Expand Up @@ -28,6 +28,7 @@ FIXES
* core: fix all comments disappear after restart if one user comment is non-persistent (Ricardo Bartels)
* core: fix macro processing (Jochen Bern)
* core: fix non-scheduled hosts/services not being updated in IDO*
* core: scheduled downtime can now start on SOFT error states

* classic ui: fix image urls in stylesheets
* classic ui: remove check_daemon_running, remains useless
Expand Down
6 changes: 3 additions & 3 deletions base/checks.c
Expand Up @@ -2,7 +2,7 @@
*
* CHECKS.C - Service and host check functions for Icinga
*
* Copyright (c) 1999-2009 Ethan Galstad (egalstad@nagios.org)
* Copyright (c) 1999-2010 Ethan Galstad (egalstad@nagios.org)
* Copyright (c) 2009-2010 Icinga Development Team (http://www.icinga.org)
*
* License:
Expand Down Expand Up @@ -1662,8 +1662,8 @@ int handle_async_service_check_result(service *temp_service, check_result *queue
state_was_logged=TRUE;
}

/* check for start of flexible (non-fixed) scheduled downtime if we just had a hard error */
if(hard_state_change==TRUE && temp_service->pending_flex_downtime>0)
/* check for start of flexible (non-fixed) scheduled downtime if we just had a hard/soft error */
if(state_change==TRUE && temp_service->pending_flex_downtime>0)
check_pending_flex_service_downtime(temp_service);

/* 10/04/07 check to see if the service and/or associate host is flapping */
Expand Down
7 changes: 3 additions & 4 deletions base/sehandlers.c
Expand Up @@ -2,7 +2,7 @@
*
* SEHANDLERS.C - Service and host event and state handlers for Icinga
*
* Copyright (c) 1999-2009 Ethan Galstad (egalstad@nagios.org)
* Copyright (c) 1999-2010 Ethan Galstad (egalstad@nagios.org)
* Copyright (c) 2009-2010 Icinga Development Team (http://www.icinga.org)
*
* License:
Expand Down Expand Up @@ -742,9 +742,8 @@ int handle_host_state(host *hst){
if(hst->state_type==HARD_STATE || (hst->state_type==SOFT_STATE && log_host_retries==TRUE))
log_host_event(hst);

/* check for start of flexible (non-fixed) scheduled downtime */
if(hst->state_type==HARD_STATE)
check_pending_flex_host_downtime(hst);
/* check for start of flexible (non-fixed) scheduled downtime in soft/hard states */
check_pending_flex_host_downtime(hst);

/* notify contacts about the recovery or problem if its a "hard" state */
if(hst->state_type==HARD_STATE){
Expand Down

0 comments on commit 1613b2a

Please sign in to comment.