Time periods problem since march 2018

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.
Locked
plajoie
Posts: 3
Joined: Fri Jul 13, 2018 12:49 pm

Time periods problem since march 2018

Post 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
plajoie
Posts: 3
Joined: Fri Jul 13, 2018 12:49 pm

Re: Time periods problem since march 2018

Post 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 ???
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: Time periods problem since march 2018

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
plajoie
Posts: 3
Joined: Fri Jul 13, 2018 12:49 pm

Re: Time periods problem since march 2018

Post 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
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: Time periods problem since march 2018

Post by cdienger »

Please PM me a copy of your /usr/local/nagios/etc directory and I'll take a close look at the config.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked