Redhat配置nagios-安装nagios-plugins

系统 Linux
Redhat配置nagios:Nagios是监控系统,Nagios能监控所指定的本地或远程主机以及服务,同时提供异常通知功能等。这篇文章讲述的是安装nagios-plugins

  安装nagios-plugins

        本文讲述的是:Redhat配置nagios返回大纲。

  [root@localhost src]# tar zxvf nagios-plugins-1.4.15.tar.gz  
 
  [root@localhost nagios-plugins-1.4.15]#./configure --with-nagios-user=nagios --with-nagios-group=nagios --prefix=/usr/local/nagios  
 
  [root@localhost nagios-plugins-1.4.15]# make && make install  
 
  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.

  验证是否安装成功,是否生成如下文件

  [root@localhost nagios-plugins-1.4.15]# ls /usr/local/nagios/libexec  
 
  check_apt check_disk_smb check_ide_smart check_mrtg check_nwstat check_sensors check_users  
 
  check_breeze check_dns check_ifoperstatus check_mrtgtraf check_oracle check_smtp check_wave  
 
  check_by_ssh check_dummy check_ifstatus check_nagios check_overcr check_ssh negate  
 
  check_clamd check_file_age check_imap check_nntp check_ping check_swap urlize  
 
  check_cluster check_flexlm check_ircd check_nt check_pop check_tcp utils.pm  
 
  check_dhcp check_ftp check_load check_ntp check_procs check_time utils.sh  
 
  check_dig check_http check_log check_ntp_peer check_real check_udp  
 
  check_disk check_icmp check_mailq check_ntp_time check_rpc check_ups  
 
  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.

  配置nagios的WEB接口,也可以通过如下命令更改用户密码,

  [root@localhost etc]# /usr/bin/htpasswd -c /usr/local/nagios/etc/htpasswd nagiosadmin  
 
  New password:  
 
  Re-type new password:  
 
  Adding password for user nagiosadmin  
 
  [root@localhost etc]# service httpd start  
 
  Starting httpd: [ OK ]  
 
  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.

  编辑httpd.conf,在结尾加上如下内容,保存,启动apache,service httpd restart

  ScriptAlias /nagios/cgi-bin /usr/local/nagios/sbin  
 
  Options ExecCGI  
 
  AllowOverride None  
 
  Order allow,deny  
 
  Allow from all  
 
  AuthName "Nagios Access"  
 
  AuthType Basic  
 
  AuthUserFile /usr/local/nagios/etc/htpasswd  
 
  Require valid-user  
 
  Alias /nagios /usr/local/nagios/share  
 
  Options None  
 
  AllowOverride None  
 
  Order allow,deny  
 
  Allow from all  
 
  AuthName "Nagios Access"  
 
  AuthType Basic  
 
  AuthUserFile /usr/local/nagios/etc/htpasswd  
 
  Require valid-user  
 
  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
  • 34.
  • 35.
  • 36.

  设置开机启动nagios服务

  [root@localhost nagios-plugins-1.4.15]# chkconfig --add nagios  
 
  [root@localhost nagios-plugins-1.4.15]# chkconfig nagios on  
 
  • 1.
  • 2.
  • 3.
  • 4.

  验证nagios配置是否正常,此命令以后会经常使用,warning和error为0,表示正常,后面不正常的讨论,这里可以启动nagios服务

  [root@localhost nagios-plugins-1.4.15]# /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg  
 
  ……  
 
  Checking misc settings...  
 
  Total Warnings: 0  
 
  Total Errors: 0  
 
  [root@localhost nagios-plugins-1.4.15]# service nagios start  
 
  Starting nagios: done.  
 
  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.

 【编辑推荐】

Nagios使用飞信Robot发送报警短信

配置nagios客户端

Nagios的安装配置记录

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

2011-03-31 16:05:18

Redhat配置nagios

2011-03-21 15:35:01

Nagiosnagios-plug安装

2011-03-31 16:09:21

Redhat配置nagios

2011-03-31 15:31:05

Redhat配置nagios

2011-03-31 16:11:23

Redhat配置nagios

2011-03-31 15:31:06

Redhat配置nagios

2011-03-31 16:45:39

Redhat配置nagios

2011-03-31 16:10:47

Redhat配置nagios

2011-03-31 16:11:22

Redhat配置nagios

2011-03-23 13:32:14

配置Nagios系统

2011-03-31 16:10:48

Redhat配置nagios

2011-03-25 17:06:55

Nagios插件plugins

2011-03-28 09:21:08

RedhatNagios

2011-03-31 15:31:06

Redhat配置nagios

2011-03-23 13:44:31

配置NDOUtils系统

2011-03-31 16:05:15

Redhat配置nagios

2011-08-22 12:25:02

nagios

2011-03-22 14:16:17

Nagios安装

2010-05-31 12:22:13

Nagios pnp

2011-03-22 13:37:29

Nagios安装
点赞
收藏

51CTO技术栈公众号