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

[dev.icinga.com #687] flexible scheduled downtime should start with soft error #348

Closed
icinga-migration opened this issue Aug 6, 2010 · 1 comment

Comments

@icinga-migration
Copy link

This issue has been migrated from Redmine: https://dev.icinga.com/issues/687

Created by mfriedrich on 2010-08-06 06:31:59 +00:00

Assignee: mfriedrich
Status: Resolved (closed on 2010-08-06 21:16:36 +00:00)
Target Version: 1.0.3
Last Update: 2010-08-06 21:16:36 +00:00 (in Redmine)


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)

Changesets

2010-08-06 13:24:33 +00:00 by mfriedrich 1613b2a

scheduled downtime can now start on SOFT error states

fixes #687
@icinga-migration
Copy link
Author

Updated by mfriedrich on 2010-08-06 21:16:36 +00:00

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

Applied in changeset commit:"1613b2aae0c240c4c7f4c2ef0177bb6c540e4f42".

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant