get_next_valid_time() fails to consider exclusions?
Luke Ross
l-ross at northwestern.edu
Thu May 29 20:30:50 CEST 2008
It looks like get_next_valid_time() fails to consider time period
exclusions. This can cause it to calculate the next time incorrectly
in some cases.
For instance, suppose I define timeperiod1 as:
define timeperiod {
timeperiod_name timeperiod1
alias Time Period 1
sunday 00:00-07:00,22:00-24:00
monday 00:00-07:00,22:00-24:00
tuesday 00:00-07:00,22:00-24:00
wednesday 00:00-07:00,22:00-24:00
thursday 00:00-07:00,22:00-24:00
friday 00:00-07:00,22:00-24:00
saturday 00:00-07:00,22:00-24:00
}
and timeperiod2 as:
define timeperiod {
timeperiod_name timeperiod2
alias Time Period 2
sunday 00:00-24:00
monday 00:00-24:00
tuesday 00:00-24:00
wednesday 00:00-24:00
thursday 00:00-24:00
friday 00:00-24:00
saturday 00:00-24:00
exclude timeperiod1
}
If I set a service to use timeperiod2 for notifications, and the
service develops a problem during the excluded times, Nagios won't
send a notification even after the excluded time is over.
Here's an example:
--The service develops a problem at 06:30 on Monday.
--Nagios recognizes the problem but decides not to send a
notification because the time is still during the exclusion period.
--Nagios sets the service's next notification time to 00:00 on
Tuesday, instead of to 07:00 on Monday.
--Nagios rechecks the service after 07:00 on Monday, but it doesn't
send a notification because "We haven't waited long enough to
re-notify contacts about this service.", because it thinks the next
notification time is 00:00 on Tuesday (i.e. still in the future).
Thanks,
Luke
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
More information about the Developers
mailing list