Nagios发送通知,即使它不应该

我有一堆非服务器设备,我想跟踪停机时间,因此我将它们集成到了我的Nagios集合中(以便生成可用性报告)。 但是,如果邮件无法访问,我不希望通过电子邮件收到警报。 因此,这些机器的条目如下所示:

define host{ host_name Moni_MacBook_Pro address 10.10.10.27 use generic-host notifications_enabled 0 } 

不过,我仍然收到通知! 我怀疑这与模板“遗传宿主”包含以下内容有关:

  check_command check-host-alive 

反过来,“通用服务”模板如下所示:

 define service{ name generic-service ; The 'name' of this service template active_checks_enabled 1 ; Active service checks are enabled passive_checks_enabled 1 ; Passive service checks are enabled/accepted parallelize_check 1 ; obsess_over_service 1 ; We should obsess check_freshness 0 ; Default is to NOT check service 'freshness' notifications_enabled 1 ; Service notifications are enabled event_handler_enabled 1 ; Service event handler is enabled flap_detection_enabled 1 ; Flap detection is enabled process_perf_data 1 ; Process performance data retain_status_information 1 ; Retain status information retain_nonstatus_information 1 ; Retain non-status information is_volatile 0 ; The service is not volatile check_period 24x7 ; max_check_attempts 3 ; normal_check_interval 10 ; retry_check_interval 2 ; Re-check the service every two minutes contact_groups admins ; Notifications get sent out to everyone in notification_options u,c ; notification_interval 1440 ; Re-notify about service problems every hour notification_period 24x7 ; Notifications can be sent out at any time register 0 ; DONT REGISTER THIS DEFINITION } 

我的诊断是,服务模板中的“notification_options u,c”行以某种方式覆盖了我的请求,而不是在主机定义中发送通知。 如果可以解决的话,怎么可能?

我想我已经整理出来了。 我有以下服务:

 #Check that ping-only hosts are up define service { hostgroup_name all service_description PING check_command check_ping!100.0,20%!500.0,60% use generic-service notification_options d,u,r notification_interval 0 } 

这可能是所有不需要的邮件都来自哪里。 这可能不需要,因为主机定义中的“check_command”也只是一个ping。 我把这里的“notification_options”更改为“n”(none)。