[Nagios-devel] H_UP notification regarless scheduled downtime

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Guest

[Nagios-devel] H_UP notification regarless scheduled downtime

Post by Guest »

Dear fellows,

Documentation states that:

"When a host or service is in a period of scheduled downtime, Nagios
will not allow normal notifications to be sent out for the host or
service."

But, apparently Nagios keep sending notifications for H_UP, regardless
if it's on scheduled downtimes or not. I've seen a running Nagios here
notify all host's contacts after a forced check and take a look at the
code(what i've found follow below). Anyone could help me to test the
behaviour above? Is that an expected behaviour ?

Index: base/notifications.c
===================================================================
--- base/notifications.c (revision 2450)
+++ base/notifications.c (working copy)
@@ -1464,16 +1464,16 @@
return ERROR;
}

- /***** RECOVERY NOTIFICATIONS ARE GOOD TO GO AT THIS POINT *****/
- if(hst->current_state == HOST_UP)
- return OK;
-
/* if this host is currently in a scheduled downtime period, don't send the notification */
if(hst->scheduled_downtime_depth > 0) {
log_debug_info(DEBUGL_NOTIFICATIONS, 1, "This host is currently in a scheduled downtime, so we won't send notifications.\n");
return ERROR;
}

+ /***** RECOVERY NOTIFICATIONS ARE GOOD TO GO AT THIS POINT *****/
+ if(hst->current_state == HOST_UP)
+ return OK;
+
/* check if we shouldn't renotify contacts about the host problem */
if(hst->no_more_notifications == TRUE) {
log_debug_info(DEBUGL_NOTIFICATIONS, 1, "We shouldn't re-notify contacts about this host problem.\n");





This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
Locked