Page 1 of 2

Nagios 2 time periods

Posted: Fri Mar 14, 2014 1:03 pm
by vvz
Hi!
I'm generally using nagios3, but on one server I have to use nagios2.
I defined timeperiods.cfg in nagios 3 as
define timeperiod{
timeperiod_name forth-week
alias 4-th week
monday 4 00:00-09:00,17:00-24:00
tuesday 4 00:00-09:00,17:00-24:00
wednesday 4 00:00-09:00,17:00-24:00
thursday 4 00:00-09:00,17:00-24:00
friday 4 00:00-09:00,17:00-24:00
saturday 4 00:00-24:00
sunday 4 00:00-24:00
}
I need first week of the month to be assigned to one guy (contact), and second to another and so on.
But , when I copied this config to Nagios2 , it does not accept this config. Nagios 2 does not have such option?
Question is - how can I do the same in Nagios2 ?
I have a manual for Nagios 2 but it does not say anything about timeperiods possibilities.
Thank you

Re: Nagios 2 time periods

Posted: Fri Mar 14, 2014 1:53 pm
by slansing
Unfortunately this is an unknown, we're going to try to find some old nagios 2 source, but nagios 2 was retired many years ago, is it possible for you to upgrade that server?

Re: Nagios 2 time periods

Posted: Fri Mar 14, 2014 2:04 pm
by vvz
no ,unfortunately not
if I'm not able to work with nagios2 I'll have to move to another box (CentOS 6.5) and install nagios3 on it.
But it will be my last opprotunity (it's not desirable due some reasons, but possible as the last resource).
I would even accept to make 365 lines in timeperiods.cfg to make each day of the year as time, but again in manual I have for Nagios2 nothing said about YYYY-MM-DD option as in Nagios3
I ganna play with all this option for the Nagios2, but now I'm busy wirh Nagios+ Asteriks telephone calls
Thank you

Re: Nagios 2 time periods

Posted: Fri Mar 14, 2014 2:06 pm
by vvz
by the way the manual I have for Nagios2 is attached

Re: Nagios 2 time periods

Posted: Fri Mar 14, 2014 4:32 pm
by sreinhardt
We have a way to get the core 2.0 code, could you specify what exact version you are on please? Just running the binary with no additional flags or files should output a version and help info.

Re: Nagios 2 time periods

Posted: Fri Mar 14, 2014 4:35 pm
by vvz
it is nagios 2.12

Re: Nagios 2 time periods

Posted: Mon Mar 17, 2014 10:25 am
by slansing
What is the configuration error you are getting when you verify your configs on that Nagios Core 2.12 system after trying to add the timeperiod definition? Trying to find relevant information on timeperiods in Core 2 right now.

Re: Nagios 2 time periods

Posted: Mon Mar 17, 2014 10:45 am
by vvz
we decided to install nagios server on another box and we ganna move to version 3.

So I don't know wether we need to continue with nagios 2, but for your question -- in the examle of time period given above ( let's say monday 3) nagios 2 says - no minutes value for monday. Nagios 3 as you obviously know monday 3 means - 3d Monday of the month and then time period in the line. My guesture is Nagios 2 is not able to work with such format as Monday 3. Or may be format of the line should be different (?). The manual I have does not say anything about timeperiods for Nagios2 except - monday, tuesday.. and so on.


So, now it is only theoretical question ( I wouldn't waste your time on that) - we are moving to nagios 3. I'm aware of nagios4 but I wanna have the same version of nagios on all machines.
thank you for your help.

Re: Nagios 2 time periods

Posted: Mon Mar 17, 2014 1:31 pm
by slansing
Oh, excellent! If I had to venture a guess, it would be that nagios 2 does not handle valid days of the month, but rather normal week days only.

Re: Nagios 2 time periods

Posted: Mon Mar 17, 2014 1:36 pm
by vvz
yes, that's I think too