I tried to implement a timeperiod section in order to introduce holiday dates into our Nagios monitoring, hoping it would avoid sending notifications during the specified days.
Unfortunatelly, it doesn't monitor anything at all anymore.
I can't figure out why, so I guess it's a matter of precedence?
Here is what I have
Code: Select all
define timeperiod{
name normalhours
timeperiod_name normal hours
alias normalhours
monday 06:00-19:00
tuesday 06:00-19:00
wednesday 06:00-19:00
thursday 06:00-19:00
friday 06:00-19:00
}
define timeperiod {
name holidays
timeperiod_name holidays
alias holidays
january 1 00:00-24:00
april 2 00:00-24:00
april 5 00:00-24:00
may 13 00:00-24:00
may 24 00:00-24:00
august 1 00:00-24:00
august 2 00:00-24:00
september 9 00:00-24:00
december 24 00:00-24:00
december 25 00:00-24:00
}
define timeperiod{
timeperiod_name hours_sans_holidays
alias Hours without the holidays
use normalhours
exclude holidays ; Get holiday exceptions from other timeperiod
}
In hours_sans_holidays, I tried several things, like use and exclude, but still, I have to comment the holidays line in order to have Nagios monitor again.
I thought normalhours would be time periods when to check, and holidays when to suspend checking.
Any idea why?