我尝试设置我的 nagios 安装以检查 SMTP 服务在其备份时间之外的可用性。不幸的是,它似乎忽略了这个配置:
# 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
}
然后,它与新主机一起使用:
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
}
我看不出有什么问题..任何线索?这是其中一封通知电子邮件
***** 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 是在 OpenBSD 5.2 上运行的 Core 3.3.1。