Icinga通知行为

我得到的通知,而不是从Icinga得到似乎没有道理,我希望有人在这里可以帮助我。 它是在Ubuntu 12.04.3 LTS上运行的Icinga 1.10.1

当主机从上到下移动时,它检查5次,然后进入硬状态。 该日志显示主机通知进程被触发,并尝试通过通知主机通过电子邮件发送电子邮件。 但没有任何事情可以通过。

ping,正常运行时间和上行链路服务立即转移到硬关键和未知状态,不会触发电子邮件通知事件。

如果上行链路服务有一个链接被移除,它将进入警告状态,检查5次,然后成功发出通知邮件。

希望这不是我已经错过的东西。

我的通用服务,主机和联系人模板以及相关设备的主机和服务定义。

# generic service template definition 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 ; Active service checks should be parallelized (disabling this can lead to major performance problems) obsess_over_service 1 ; We should obsess over this service (if necessary) 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 failure_prediction_enabled 1 ; Failure prediction is enabled process_perf_data 1 ; Process performance data retain_status_information 1 ; Retain status information across program restarts retain_nonstatus_information 1 ; Retain non-status information across program restarts max_check_attempts 5 check_interval 1 retry_interval 1 check_period 24x7 notification_interval 30 notification_period 24x7 notification_options w,u,c,r contact_groups sys-admins register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL SERVICE, JUST A TEMPLATE! } #service definitions in localhost_icinga.cfg #check uptime define service{ use generic-service host_name 1.switch.foo.com service_description Uptime Test check_command check_snmp!public!sysUpTime.0 } #check ping for AS5 for test notifications define service{ use generic-service host_name 1.switch.foo.com service_description Ping Test check_command check_ping!200.0,20%!600.0,60% } define service{ use generic-service host_name 1.switch.foo.com service_description Uplink Ports Check check_command check_multi_snmp!/etc/icinga/objects/switches/1s_uplink.cmd!15 } 

 # Generic host definition template - This is NOT a real host, just a template! define host{ name generic-host ; The name of this host template notifications_enabled 1 ; Host notifications are enabled event_handler_enabled 1 ; Host event handler is enabled flap_detection_enabled 1 ; Flap detection is enabled failure_prediction_enabled 1 ; Failure prediction is enabled process_perf_data 1 ; Process performance data retain_status_information 1 ; Retain status information across program restarts retain_nonstatus_information 1 ; Retain non-status information across program restarts check_command check-host-alive check_interval 1 retry_interval 1 max_check_attempts 5 check_period 24x7 contact_groups sys-admins notification_interval 30 notification_period 24x7 notification_options d,u,r register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE! } # Define a template for switches that we can reuse define host{ name generic-switch ; The name of this host template use generic-host ; Inherit default values from the generic-host template register 0 ; DONT REGISTER THIS - ITS JUST A TEMPLATE } #Host definition in localhost_icinga.cfg define host{ use generic-switch ; Inherit default values from a template host_name 1.switch.foo.com ; The name we're giving to this switch alias S1 - HP Pro-Curve 1800-24G J9028B ; A longer name associated with the switch address 10.1.1.242 ; IP address of the switch hostgroups switches ; Host groups this switch is associated with } 

 #Define a generic contact for Icinga define contact{ name generic-contact service_notification_period 24x7 host_notification_period 24x7 service_notification_options w,u,c,r,f,s host_notification_options d,u,r,f,s service_notification_commands notify-service-by-email host_notification_commands notify-host-by-email register 0 } #icinga_contacts.cfg define contact{ contact_name bob use generic-contact alias bob (Sysadmin) email [email protected] } define contactgroup{ contactgroup_name sys-admins alias System Administrator members bob }