Page 1 of 1

Which day is Nagios starting his week ?

Posted: Mon Oct 08, 2018 6:10 am
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

Re: Which day is Nagios starting his week ?

Posted: Mon Oct 08, 2018 11:44 am
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.

Re: Which day is Nagios starting his week ?

Posted: Tue Oct 09, 2018 3:21 am
by amans
Thx !
That's the info I was looking for ;)

Re: Which day is Nagios starting his week ?

Posted: Tue Oct 09, 2018 6:49 am
by scottwilkerson
amans wrote:Thx !
That's the info I was looking for ;)
Locking thread