Page 1 of 1

Re: [Nagios-devel] check_period, timeperiod exclusions,

Posted: Mon Oct 15, 2012 7:58 am
by Guest
On 10/12/2012 07:10 PM, John Sellens wrote:
> 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.
>

There is. I'll take a look at it when I get the time. There's also a bug
reported for that at tracker.nagios.org, so the problem is known. Thanks
for reporting it though. I'd forgotten about that and may have time to
fix it before Nagios 4.

--
Andreas Ericsson andreas.ericsson@op5.se
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231

Considering the successes of the wars on alcohol, poverty, drugs and
terror, I think we should give some serious thought to declaring war
on peace.





This post was automatically imported from historical nagios-devel mailing list archives
Original poster: ae@op5.se