Page 1 of 1

when hardstate transition occurs outside notification_period

Posted: Tue Jul 19, 2011 11:47 am
by lyle
If a service check transitions to a hard error state, but the time is outside the notification_period, no notifications are sent out.

Later, if the state remains the same, but the time then enters the notification_period, will the notification be sent out at that point?

Or does a state-transition have to occur *within* the notification_period?

Perhaps Nagios waits until the next timeout of notification_interval that occurs within the notification_period for a notification to go out.

Whatever the answer, I assume the same logic applies when a OK hard-state transition occurs.

Thanks for any advice....Lyle

Re: when hardstate transition occurs outside notification_pe

Posted: Tue Jul 19, 2011 1:27 pm
by mguthrie
Later, if the state remains the same, but the time then enters the notification_period, will the notification be sent out at that point?
Only if the "notification_interval" is set, and it will be sent at whatever time the notification is scheduled to go out. Nagios won't "hold" notifications if that's what you're asking. Hopefully that answers your question...

The Core manual is still the best reference for the event/notification logic.
http://nagios.sourceforge.net/docs/3_0/ ... tions.html
http://nagios.sourceforge.net/docs/3_0/ ... dlers.html
http://nagios.sourceforge.net/docs/3_0/statetypes.html

Re: when hardstate transition occurs outside notification_pe

Posted: Tue Jul 19, 2011 5:36 pm
by lyle
I believe I understand, and I went back to re-read Notifications in the Core docs. But just to make sure, how about an example:

- a hard state change to Critical occurs at midnight
- "notification_period" is set to 1AM through 6AM, so no notification goes out at midnight
- "notification_interval" is set to 2hours, so the first notification goes out at 2AM, even though the "notification period" started at 1AM

Does this sound correct. If so, you can close the call

Thanks....Lyle

Re: when hardstate transition occurs outside notification_pe

Posted: Wed Jul 20, 2011 9:26 am
by mguthrie
Yes, to the best of my understanding that is correct.