- define service{
- host_name mysql // 监控服务名
- service_description check-host-alive // 监控描述
- check_command check-host-alive // 监控命令名 (主机是否存活)
- max_check_attempts 3 // 检查失败后重试次数
- check_interval 2 // 检查间隔时间
- retry_interval 2 // 重试间隔时间
- check_period 24x7 // 监控时间段 timeperiods.cfg 中定义的时间
- notification_interval 300 // 提醒的间隔时间, 每 300 秒提醒一次
- notification_period 24x7 // 提醒的周期, 是在 timeperiods.cfg 中定义的
- notification_options w,u,c,r // 当主机出现 w-warning, u-unknown,c-critical,r - 从异常状态恢复时提醒管理员 (d-down)
- #contact_groups admins
- process_perf_data 1
- }
- define service{
- host_name mysql
- service_description check-procs
- check_command check_nrpe!check_total_procs
- max_check_attempts 3
- check_interval 2
- retry_interval 2
- check_period 24x7
- notification_interval 300
- notification_period 24x7
- notification_options w,u,c,r
- #contact_groups admins
- process_perf_data 1
- }
- define service{
- host_name mysql
- service_description check-load
- check_command check_nrpe!check_load
- max_check_attempts 3
- check_interval 2
- retry_interval 2
- check_period 24x7
- notification_interval 300
- notification_period 24x7
- notification_options w,u,c,r
- #contact_groups admins
- process_perf_data 1
- }
- define service{
- host_name mysql
- service_description check-ssh
- check_command check_ssh
- max_check_attempts 3
- check_interval 2
- retry_interval 2
- check_period 24x7
- notification_interval 300
- notification_period 24x7
- notification_options w,u,c,r
- #contact_groups admins
- process_perf_data 1
- }
来源: http://www.bubuko.com/infodetail-2547781.html