H_UP notification regarless scheduled downtime

Ricardo Jose Maraschini ricardo.maraschini at opservices.com.br
Tue Nov 6 17:07:15 CET 2012


Hya!

* Andreas Ericsson (ae at op5.se) wrote:
> It's expected behaviour if you got the problem notification that
> preceded the recovery notification. Otherwise it's not.

That's ok, but the same behaviour apparently isn't valid for service
notifications. BTW, the following code sounds kinda strange and
senseless to me. Is there any possibility to get first_problem_time !=
of svc->last_time_ok on it ?

As it's running ok so far, i just cut it off, but maybe i should only
remove those svc->last_time_xxx > svc->last_time_ok during comparsions.

Comments?

Index: base/notifications.c
===================================================================
--- base/notifications.c	(revision 2455)
+++ base/notifications.c	(working copy)
@@ -527,13 +527,6 @@
 
 		/* determine the time to use of the first problem point */
 		first_problem_time = svc->last_time_ok; /* not accurate, but its the earliest time we could use in the comparison */
-		if((svc->last_time_warning < first_problem_time) && (svc->last_time_warning > svc->last_time_ok))
-			first_problem_time = svc->last_time_warning;
-		if((svc->last_time_unknown < first_problem_time) && (svc->last_time_unknown > svc->last_time_ok))
-			first_problem_time = svc->last_time_unknown;
-		if((svc->last_time_critical < first_problem_time) && (svc->last_time_critical > svc->last_time_ok))
-			first_problem_time = svc->last_time_critical;
-
 		if(current_time < (time_t)((first_problem_time == (time_t)0L) ? program_start : first_problem_time) + (time_t)(svc->first_notification_delay * interval_length)) {
 			log_debug_info(DEBUGL_NOTIFICATIONS, 1, "Not enough time has elapsed since the service changed to a non-OK state, so we should not notify about this problem yet\n");
 			return ERROR;


------------------------------------------------------------------------------
LogMeIn Central: Instant, anywhere, Remote PC access and management.
Stay in control, update software, and manage PCs from one command center
Diagnose problems and improve visibility into emerging IT issues
Automate, monitor and manage. Do more in less time with Central
http://p.sf.net/sfu/logmein12331_d2d




More information about the Developers mailing list