Which day is Nagios starting his week ?

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
amans
Posts: 2
Joined: Mon Oct 30, 2017 3:24 am

Which day is Nagios starting his week ?

Post by amans »

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
skang
Support Tech
Posts: 10
Joined: Thu Jul 19, 2018 10:17 am

Re: Which day is Nagios starting his week ?

Post by skang »

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.
amans
Posts: 2
Joined: Mon Oct 30, 2017 3:24 am

Re: Which day is Nagios starting his week ?

Post by amans »

Thx !
That's the info I was looking for ;)
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Which day is Nagios starting his week ?

Post by scottwilkerson »

amans wrote:Thx !
That's the info I was looking for ;)
Locking thread
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked