I'm having troubles getting Nagios to honor a notification_period setting for a predefined timeperiod.
My timeperiod definition is called 'sleep' as in, do not notify me between midnight and 7am. it looks like this:
define timeperiod{
timeperiod_name sleep
alias Not Middle of Night
sunday 07:00-23:59
monday 07:00-23:59
tuesday 07:00-23:59
wednesday 07:00-23:59
thursday 07:00-23:59
friday 07:00-23:59
saturday 07:00-23:59
}
I've entered the directive for the hosts as follows:
define host{
use linux-server,host-pnp
host_name server.domain.com
alias server.domain.com
address xxx.33.xxx.243
notification_period sleep
}
This morning I was expecting to see WARNING notifications but only after 7am. Instead, I saw them throughout the night between 23:59 last night and 7am this morning.
My understanding from the configuration is that I should NOT have received any emails during this time.
Have I overlooked something? I was hoping it would be this simple but it didn't work as expected.
I have solved this issue which stemmed from a lack of understanding of the way Nagios is configured. In short, custom service checks require custom notification_period directives if desired.
The question was asked and correctly answered in detail here:
Nagios Forum: notification_period not honoured on host config?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With