From 1613b2aae0c240c4c7f4c2ef0177bb6c540e4f42 Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Fri, 6 Aug 2010 15:24:33 +0200 Subject: [PATCH] scheduled downtime can now start on SOFT error states fixes #687 --- Changelog | 1 + base/checks.c | 6 +++--- base/sehandlers.c | 7 +++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Changelog b/Changelog index eb4a6ef5f..71f54281e 100644 --- a/Changelog +++ b/Changelog @@ -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 diff --git a/base/checks.c b/base/checks.c index b3ea2423e..7402d66b8 100644 --- a/base/checks.c +++ b/base/checks.c @@ -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: @@ -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 */ diff --git a/base/sehandlers.c b/base/sehandlers.c index c56e26232..cbd92e30c 100644 --- a/base/sehandlers.c +++ b/base/sehandlers.c @@ -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: @@ -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){