Nagios系統(tǒng)下nagios.cfg配置說(shuō)明
nagios系統(tǒng)nagios.cfg 配置說(shuō)明
1、aggregate_status_updates = <0/1> 統(tǒng)計(jì)狀態(tài)更新選項(xiàng):0不更新;1更新
2、status_update_interval= 狀態(tài)更新間隔:秒
3、enable_notifications = <0/1> 是否通知:0不通知;1通知
4、execute_service_checks = <0/1> 檢查服務(wù)選項(xiàng):0不檢查;1檢查
5、accept_passive_service_checks=<0/1> 是否接受被動(dòng)服務(wù)檢查:0不檢查;1檢查
6、enable_event_handlers=<0/1> 事件處理:0不檢查;1檢查
7、log_rotation_method=
log輪循:
n = None (don't rotate the log - this is the default)
h = Hourly (rotate the log at the top of each hour)
d = Daily (rotate the log at midnight each day)
w = Weekly (rotate the log at midnight on Saturday)
m = Monthly (rotate the log at midnight on the last day of the month)
8、check_external_commands=<0/1>
9、service_check_timeout = 如果服務(wù)檢查時(shí)間超過(guò)了所定義的時(shí)間,顯示CRITICAL狀態(tài)。
10、host_check_timeout= 如果主機(jī)檢查時(shí)間超過(guò)了所定義的時(shí)間,顯示CRITICAL狀態(tài)。
11、event_handler_timeout= 事件處理最長(zhǎng)時(shí)間,超出后Warning記錄到log中。
12、process_performance_data=<0/1> 性能監(jiān)測(cè)選項(xiàng):0不檢查;1檢查
13、check_service_freshness=<0/1> 刷新服務(wù)選項(xiàng):0不檢查;1檢查
14、illegal_object_name_chars= 不規(guī)范定義字符
一、主要包括的定義文件有: Services、Hosts、Host Groups、Contacts、Contact Groups、Commands、Time Periods、Service Escalations、Service Dependencies、Host Escalations、Host Dependencies、Hostgroup Escalations
1.CGI.cfg
1)、main_config_file=/usr/local/nagios/etc/nagios.cfg Nagios主配置文件
2)、physical_html_path=/usr/local/nagios/share web頁(yè)面所在路徑
3)、use_authentication=<0/1> 用戶驗(yàn)證選項(xiàng):0不驗(yàn)證;1驗(yàn)證
2.配置驗(yàn)證
1)、vi httpd.conf,添加下面的內(nèi)容到httpd.conf文件中
- AllowOverride AuthConfig
- order allow,deny
- allow from all
- Options ExecCGI
2)、如果還需要對(duì)html頁(yè)面也進(jìn)行驗(yàn)證,需要vi httpd.conf,添加下面的內(nèi)容
- AllowOverride AuthConfig
- order allow,deny
- allow from all
3)、然后在cgi所在目錄新增.htaccess文件,文件內(nèi)容見(jiàn)下面
- AuthName "Nagios Access"
- AuthType Basic
- AuthUserFile /usr/local/nagios/etc/htpasswd.users
- require valid-user
4)、設(shè)置驗(yàn)證用戶賬號(hào)
- htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin
5)、默認(rèn)權(quán)限
【編輯推薦】