Page 1 of 1

Time periods problem since march 2018

Posted: Fri Jul 13, 2018 2:13 pm
by plajoie
Hi,
I have a problem with time periods schedule since March 2018. For several years, My collegue and I, use the same time period that change each month. There is an example of time schedule:

define timeperiod {
timeperiod_name Tech1
alias Tech1
january 1-31 07:00-17:00
february 1-29 00:00-24:00
march 1-31 07:00-17:00
april 1-30 00:00-24:00
may 1-31 07:00-17:00
june 1-30 00:00-24:00
july 1-31 07:00-17:00
august 1-31 00:00-24:00
september 1-30 07:00-17:00
october 1-31 00:00-24:00
november 1-30 07:00-17:00
december 1-31 00:00-24:00
}

define timeperiod {
timeperiod_name Tech2
alias Tech2
january 1-31 00:00-24:00
february 1-29 07:00-17:00
march 1-31 00:00-24:00
april 1-30 07:00-17:00
may 1-31 00:00-24:00
june 1-30 07:00-17:00
july 1-31 00:00-24:00
august 1-31 07:00-17:00
september 1-30 00:00-24:00
october 1-31 07:00-17:00
november 1-30 00:00-24:00
december 1-31 07:00-17:00
}

For example, I'm on call 24x7 all the months of July 2018 with the Tech2 schedule. Since the month of March, I do not receive notifications after 17:00 for the months when I'm on call 24x7. I tried many versions of nagios from version 3.5.1 to version 4.1.1 and it's the same thing. I have two nagios servers, one on Suse enterprise 12 and one on Amazon linux in the cloud and it's also the same thing. I played with the dates before the month of March 2018 and everything works. For the years 2019, 2020, etc ... only the month of January works. For the Tech1 schedule, it's like it's a 24x7 schedule. Tech1 still receives notifications.

Thank you for your help
-Patrick Lajoie

Re: Time periods problem since march 2018

Posted: Sun Jul 15, 2018 8:56 pm
by plajoie
I found the problem, Is it possible that nagios does not support Leap year ? Because I replace february 29 for february 28 and it's work. Does that mean that I have to change february 28 for february in 2020 ???

Re: Time periods problem since march 2018

Posted: Mon Jul 16, 2018 10:03 am
by cdienger
I tested this on a 4.4.1 install without issue and couldn't seem to find any fixes between 4.1.1 and that that would address it, but I would start by testing a more recent version and upgrade if it has been resolved.

Re: Time periods problem since march 2018

Posted: Mon Jul 16, 2018 12:51 pm
by plajoie
I tested on 4.4.1 and I have the same issue. Did you tried to put in timeperiods.cfg:

define timeperiod {
timeperiod_name Tech1
alias Tech1
january 1-31 07:00-17:00
february 1-29 00:00-24:00
march 1-31 07:00-17:00
}

I think that if you put 29 instead 28 like last day of february and 2018 is not a leap year, it is not working

Re: Time periods problem since march 2018

Posted: Wed Jul 18, 2018 4:14 pm
by cdienger
Please PM me a copy of your /usr/local/nagios/etc directory and I'll take a close look at the config.