Nagios 2 time periods

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.
vvz
Posts: 187
Joined: Wed Oct 30, 2013 5:15 pm

Nagios 2 time periods

Post 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
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Nagios 2 time periods

Post 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?
vvz
Posts: 187
Joined: Wed Oct 30, 2013 5:15 pm

Re: Nagios 2 time periods

Post 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
vvz
Posts: 187
Joined: Wed Oct 30, 2013 5:15 pm

Re: Nagios 2 time periods

Post by vvz »

by the way the manual I have for Nagios2 is attached
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Nagios 2 time periods

Post 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.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
vvz
Posts: 187
Joined: Wed Oct 30, 2013 5:15 pm

Re: Nagios 2 time periods

Post by vvz »

it is nagios 2.12
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Nagios 2 time periods

Post 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.
vvz
Posts: 187
Joined: Wed Oct 30, 2013 5:15 pm

Re: Nagios 2 time periods

Post 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.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Nagios 2 time periods

Post 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.
vvz
Posts: 187
Joined: Wed Oct 30, 2013 5:15 pm

Re: Nagios 2 time periods

Post by vvz »

yes, that's I think too
Locked