一、
關鍵資料引用:
1、http://www.ibm.com/developerworks/linux/library/l-ganglia-nagios-2/index.html 舊版本安裝以及配置
2、http://www.centoscn.com/CentosServer/log/2013/0820/1420.html ganglia安裝
3、http://nagios.sourceforge.net/docs/3_0/objectdefinitions.html nagios的各種object的定義
二、nagios一些關鍵詞 Service
設置nagios的關鍵是編輯 /usr/local/nagios/etc 中的 .cfg 文件,其風格爲面向對象編程風格,可以在其新建 .cfg文件,爲了讓nagios可知,
需要在nagios.cfg 裏申明cfg_file="" 或者 cfg_dir=""。具體對象定義參看上面引用3,其最核心元素是service對象
define service{ | ||
host_name | host_name | |
hostgroup_name | hostgroup_name | |
service_description | service_description | |
display_name | display_name | |
servicegroups | servicegroup_names | |
is_volatile | [0/1] | |
check_command | command_name | |
initial_state | [o,w,u,c] | |
max_check_attempts | # | |
check_interval | # | |
retry_interval | # | |
active_checks_enabled | [0/1] | |
passive_checks_enabled | [0/1] | |
check_period | timeperiod_name | |
obsess_over_service | [0/1] | |
check_freshness | [0/1] | |
freshness_threshold | # | |
event_handler | command_name | |
event_handler_enabled | [0/1] | |
low_flap_threshold | # | |
high_flap_threshold | # | |
flap_detection_enabled | [0/1] | |
flap_detection_options | [o,w,c,u] | |
process_perf_data | [0/1] | |
retain_status_information | [0/1] | |
retain_nonstatus_information | [0/1] | |
notification_interval | # | |
first_notification_delay | # | |
notification_period | timeperiod_name | |
notification_options | [w,u,c,r,f,s] | |
notifications_enabled | [0/1] | |
contacts | contacts | |
contact_groups | contact_groups | |
stalking_options | [o,w,u,c] | |
notes | note_string | |
notes_url | url | |
action_url | url | |
icon_image | image_file | |
icon_image_alt | alt_string | |
} |
三、 實用命令: nagios -v nagios.cfg (檢驗nagios.cfg各個定義依賴是否正確)