I tried to set up my nagios install to check the availability of a SMTP service outside its backup hours. Unfortunately, it seems to be ignoring this configuration:
# a timeperiod to check only outside of zimbra's backup hour
# (combining the first with the second timeperiod)
define timeperiod {
timeperiod_name zimbra-backups
alias When zimbra is being backed up
sunday 04:00-05:00
monday 04:00-05:00
tuesday 04:00-05:00
wednesday 04:00-05:00
thursday 04:00-05:00
friday 04:00-05:00
saturday 04:00-05:00
}
define timeperiod {
timeperiod_name always-except-zimbra-backups
alias 24x7 except backup time
sunday 00:00-24:00
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
exclude zimbra-backups
}
Which, then, is used with a new host:
define host {
host_name mailserver-except-backups
alias mail server (outside backup hours)
address yaddayadda
notification_options d,u,r,f
use my-default-host
check_period always-except-zimbra-backups
}
define service {
host_name mailserver-except-backups
service_description SMTP service
check_command check_smtp!-t 30
use my-default-service
check_interval 2
retry_interval 1
}
I can't see what's wrong.. any clue? Here is one of the notification e-mail
***** Nagios *****
Notification Type: PROBLEM
Service: SMTP service
Host: mail server (outside backup hours)
Address: yaddayadda
State: CRITICAL
Date/Time: Sat Apr 27 04:03:16 CEST 2013
Additional Info:
Connection refused
Nagios is Core 3.3.1 running on a OpenBSD 5.2.