z

Commercial Support Clients: Clients with support contracts can get escalated support assistance by visiting Nagios Answer Hub. These forums are for community support services. Although we at Nagios try our best to help out on the forums here, we always give priority support to our support clients.

[Nagios-devel] check_period, timeperiod exclusions,

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.

[Nagios-devel] check_period, timeperiod exclusions,

Postby Guest » Fri Oct 12, 2012 4:27 pm

Hi - we've just encountered some unexpected behaviour where the next
check time for a service gets set to 00:00 tomorrow when we enter a
a timeperiod exclusion. It seems like it might be a bug in check_period
timeperiod handling, but I have no idea where to start looking in the code.

I have a service defined with "check_period not_fridayaft", and the timeperiods
defined like this:

define timeperiod {
timeperiod_name not_fridayaft
alias not friday aft
use 24x7
exclude fridayaft
}
define timeperiod {
timeperiod_name fridayaft
alias friday aft
friday 12:45-12:55
}

At 12:45 Friday, the service state information page starts showing:

Next Scheduled Check: 10-13-2012 00:00:00

and the service is not checked until Saturday rolls around.

But, if I redefine the timeperiod to be explicit, and not use exclude, like this:

define timeperiod {
timeperiod_name not_fridayaft
alias not friday aft
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-12:45,12:55-24:00
saturday 00:00-24:00
}

restart Nagios, and the service's next check time shows up correctly:

Next Scheduled Check: 10-12-2012 12:55:00

This is 3.4.1, which I built based on nagios-3.4.1-2.el6.src.rpm using a
nagios.spec build file with the last modification:
* Thu Jun 28 2012 Petr Pisar - 3.4.1-2
The nagios.spec adds a few patches, but I don't see anything that makes me
think it would trigger this.

Has anyone else seem anything like this? I've got a workaround (by avoiding
the exclude), but it makes me wonder if there's a bug in the timeperiod
exclusion handling code.

Thanks - cheers!

John
jsellens@syonex.com






This post was automatically imported from historical nagios-devel mailing list archives
Original poster: jsellens@syonex.com
Guest
 

Return to Open Source Nagios Projects

Who is online

Users browsing this forum: Google [Bot] and 22 guests