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 notification_period none ; Send host notifications at any time check_period none check_command check-host-alive register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE! }
发布评论
评论(7)
方法很棒!!
请看 templates.cfg 文件,中的 check_command check-host-alive
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
notification_period none ; Send host notifications at any time
check_period none
check_command check-host-alive
register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE!
}
引用来自“鲍平”的答案
/usr/local/nagios/etc/objects/commands.cfg
引用来自“鲍平”的答案
/usr/local/nagios/etc/objects/commands.cfg
引用来自“鲍平”的答案
我是把 check_host_alive 命令给改成了 /bin/echo 主机永远是绿色
我是把 check_host_alive 命令给改成了 /bin/echo 主机永远是绿色
/usr/local/nagios/etc/objects/commands.cfg