Nagios系统下nagios.cfg配置说明

运维 系统运维
Nagios系统下nagios.cfg配置文件说明:Nagios是一个监视系统运行状态和网络信息的监视系统。Nagios能监视所指定的本地或远程主机以及服务,同时提供异常通功能等。本文讲述的是Nagios系统下nagios.cfg配置说明。

  nagios系统nagios.cfg 配置说明

  1、aggregate_status_updates = <0/1> 统计状态更新选项:0不更新;1更新

  2、status_update_interval= 状态更新间隔:秒

  3、enable_notifications = <0/1> 是否通知:0不通知;1通知

  4、execute_service_checks = <0/1> 检查服务选项:0不检查;1检查

  5、accept_passive_service_checks=<0/1> 是否接受被动服务检查: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 = 如果服务检查时间超过了所定义的时间,显示CRITICAL状态。

  10、host_check_timeout= 如果主机检查时间超过了所定义的时间,显示CRITICAL状态。

  11、event_handler_timeout= 事件处理最长时间,超出后Warning记录到log中。

  12、process_performance_data=<0/1> 性能监测选项:0不检查;1检查

  13、check_service_freshness=<0/1> 刷新服务选项:0不检查;1检查

  14、illegal_object_name_chars= 不规范定义字符

  一、主要包括的定义文件有: 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页面所在路径

  3)、use_authentication=<0/1> 用户验证选项:0不验证;1验证

  2.配置验证

  1)、vi httpd.conf,添加下面的内容到httpd.conf文件中

  1.   AllowOverride AuthConfig  
  2.  
  3.   order allow,deny  
  4.  
  5.   allow from all  
  6.  
  7.   Options ExecCGI  
  8.  

  2)、如果还需要对html页面也进行验证,需要vi httpd.conf,添加下面的内容

  1.   AllowOverride AuthConfig  
  2.  
  3.   order allow,deny  
  4.  
  5.   allow from all  
  6.  

  3)、然后在cgi所在目录新增.htaccess文件,文件内容见下面

  1.   AuthName "Nagios Access"  
  2.  
  3.   AuthType Basic  
  4.  
  5.   AuthUserFile /usr/local/nagios/etc/htpasswd.users  
  6.  
  7.   require valid-user  
  8.  

  4)、设置验证用户账号

  1.   htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin  
  2.  

  5)、默认权限

【编辑推荐】

Nagios飞信linux短信报警脚本配置

Nagios安装记录

如何用Nagios监控远程系统

责任编辑:zhaolei 来源: mblogger
相关推荐

2011-04-01 16:30:49

Nagios

2011-03-21 11:14:22

LinuxNagios

2011-03-22 13:37:29

Nagios安装

2011-03-31 15:31:06

Redhat配置nagios

2011-03-31 16:05:18

Redhat配置nagios

2011-08-22 12:25:02

nagios

2010-05-31 11:10:37

Nagios pnp

2011-03-21 09:17:06

Nagios

2011-11-08 21:58:01

Nagios 配置 流

2011-03-25 10:37:17

2011-03-25 16:49:33

nagios服务

2011-03-25 15:37:17

Solarisnagios

2011-03-21 15:42:14

LinuxNagios

2014-08-06 15:25:36

LinuxNagios

2010-05-31 12:22:13

Nagios pnp

2011-03-31 16:05:18

Redhat配置nagios

2010-05-31 10:22:31

Nagios pnp

2011-03-28 15:22:00

nagios

2011-03-22 10:10:21

Nagios配置

2011-03-28 11:03:09

配置Nagios
点赞
收藏

51CTO技术栈公众号