Bug #687

flexible scheduled downtime should start with soft error

Added by dnsmichi over 3 years ago. Updated over 3 years ago.

Status:ResolvedStart date:08/06/2010
Priority:NormalDue date:
Assignee:dnsmichi% Done:

100%

Category:Scheduled Downtime
Target version:1.0.3
Icinga Version: OS Version:

Description

http://tracker.nagios.org/view.php?id=47

  Summary       0000047: flexible scheduled downtime should start with soft error
Description     Flexible scheduled downtimes starts with Hard errors. sice soft errors are reported inside the cgi's, the cgi's reporting errors for scheduled Downtimes, because they start not before a Hard erro occours.

I think flexible downtimes should start with a soft error.

Additional Information     
[07-07-2009 23:07:00] SERVICE DOWNTIME ALERT: secsrv02;PROZESS-MYSQL;STARTED; Service has entered a period of scheduled downtime

[07-07-2009 23:07:00] SERVICE ALERT: secsrv02;PROZESS-MYSQL;CRITICAL;HARD;2;PROCS CRITICAL: 0 processes with command name 'mysqld', UID = 104 (mysql), args '--datadir=/var/lib/mysql'

[07-07-2009 23:06:00] SERVICE ALERT: secsrv02;PROZESS-MYSQL;CRITICAL;SOFT;1;PROCS CRITICAL: 0 processes with command name 'mysqld', UID = 104 (mysql), args '--datadir=/var/lib/mysql'

http://git.nagiosprojects.org/?p=nagios.git;a=commit;h=a000a6df9a7e4e0eb02c9cdf70a5b987f02d7cda

diff --git a/Changelog b/Changelog

index 22b7e5a..cf75ded 100644 (file)

--- a/Changelog

+++ b/Changelog

@@ -10,6 +10,7 @@ ENHANCEMENTS

 * Patch to speed up loading of state retention data (Matthieu Kermagoret)

 * Custom notifications are now suppressed during scheduled downtime (Sven Nierlein)

 * Added code to warn user about exit code of 126 meaning plugin is not executable (bug #153)

+* Scheduled downtime can now start on SOFT error states (bug #47)

 FIXES

 * Fix for choosing next valid time on day of DST change when clocks go one hour backwards

diff --git a/base/checks.c b/base/checks.c

index a634181..194f7ee 100644 (file)

--- a/base/checks.c

+++ b/base/checks.c

@@ -3,7 +3,7 @@

  * CHECKS.C - Service and host check functions for Nagios

  *

  * Copyright (c) 1999-2010 Ethan Galstad (egalstad@nagios.org)

- * Last Modified: 08-04-2010

+ * Last Modified: 08-05-2010

  *

  * License:

  *

@@ -1520,7 +1520,9 @@ int handle_async_service_check_result(service *temp_service, check_result *queue

                                }

                        /* 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)

+                       /* CHANGED 08/05/2010 EG - flex downtime can now start on soft errors */

+                       /*if(hard_state_change==TRUE && temp_service->pending_flex_downtime>0)*/

+                       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 0d116aa..6def42e 100644 (file)

--- a/base/sehandlers.c

+++ b/base/sehandlers.c

@@ -2,8 +2,8 @@

  *

  * SEHANDLERS.C - Service and host event and state handlers for Nagios

  *

- * Copyright (c) 1999-2009 Ethan Galstad (egalstad@nagios.org)

- * Last Modified:   01-02-2009

+ * Copyright (c) 1999-2010 Ethan Galstad (egalstad@nagios.org)

+ * Last Modified:   08-05-2010

  *

  * License:

  *

@@ -743,8 +743,9 @@ int handle_host_state(host *hst){

                        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);

+               /* CHANGED 08-05-2010 EG flex downtime can now start on soft states */

+               /*if(hst->state_type==HARD_STATE)*/

+               check_pending_flex_host_downtime(hst);

                /* notify contacts about the recovery or problem if its a "hard" state */

                if(hst->state_type==HARD_STATE)

Associated revisions

Revision 1613b2aa
Added by dnsmichi over 3 years ago

scheduled downtime can now start on SOFT error states

fixes #687

History

#1 Updated by dnsmichi over 3 years ago

  • Status changed from Assigned to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF