Which day is Nagios starting his week ?

An open discussion forum for obtaining help with Nagios Core. Nagios Core users of all experience levels are welcome here. Subforum have been created for the discussion of Nagios Core and Nagios Plugin development.

NOTE: The SourceForge.net mailing lists have been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

Which day is Nagios starting his week ?

Postby amans » Mon Oct 08, 2018 6:10 am

Hi everyone !

I'm facing a problem I don't understand.
I'm don't understand which day is starting a week in Nagios. I thought it was Sunday but apparently no.

I use some notification_period to disable notification during certain timeslot.
For example, this monday, a server should not have notified during 02:10 > 04:15.

Code: Select all
# auto_monday_1_0210_0415
define timeperiod{
        timeperiod_name auto_monday_1_0210_0415
        alias           auto_monday_1_0210_0415
        monday          00:00-24:00
        tuesday         00:00-24:00
        wednesday       00:00-24:00
        thursday        00:00-24:00
        friday          00:00-24:00
        saturday        00:00-24:00
        sunday          00:00-24:00
        exclude         e_monday_1_0210_0415
}
# monday_1_0210_0415
define timeperiod{
        timeperiod_name e_monday_1_0210_0415
        alias monday_1_0210_0415
        monday 1 02:10-04:15
}


I thought monday 1 was suppose to be this monday !
But it was last monday, the 1st october !
If Nagios is beginning his week the Sunday, it shouldn't have been enable the 1st october but the 8th.
Am I right ?

Which day a week starts in Nagios ? Sunday (apparently no) ? Monday ?
Can we change it ?

> Nagios 3.5.0

Yann

Thx
amans
 
Posts: 2
Joined: Mon Oct 30, 2017 3:24 am

Re: Which day is Nagios starting his week ?

Postby skang » Mon Oct 08, 2018 11:44 am

In Core, 'monday 1' in the object definition just simply means 1st Monday of the month, instead of 1st Monday of the 1st week that starts with Sunday.

Since October 1st was indeed the first Monday of the month, that is what it referred to. This means that technically, in the month of October, you can even have 5th Monday - monday 5, which would refer to 29th.

I hope this clears up the confusion about the time period.
skang
Support Tech
 
Posts: 10
Joined: Thu Jul 19, 2018 10:17 am

Re: Which day is Nagios starting his week ?

Postby amans » Tue Oct 09, 2018 3:21 am

Thx !
That's the info I was looking for ;)
amans
 
Posts: 2
Joined: Mon Oct 30, 2017 3:24 am

Re: Which day is Nagios starting his week ?

Postby scottwilkerson » Tue Oct 09, 2018 6:49 am

amans wrote:Thx !
That's the info I was looking for ;)


Locking thread
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
DevOps Engineer
 
Posts: 12020
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises


Return to Nagios Core

Who is online

Users browsing this forum: No registered users and 13 guests