Redhat如何配置nagios-安装nagios-plugins

发布时间:2021-10-28 11:37:00 作者:小新
来源:亿速云 阅读:117

这篇文章将为大家详细讲解有关Redhat如何配置nagios-安装nagios-plugins,小编觉得挺实用的,因此分享给大家做个参考,希望大家阅读完这篇文章后可以有所收获。

安装nagios-plugins

[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

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

[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

配置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 ]

编辑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

设置开机启动nagios服务

[root@localhost nagios-plugins-1.4.15]# chkconfig --add nagios   [root@localhost nagios-plugins-1.4.15]# chkconfig nagios on

验证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.

关于“Redhat如何配置nagios-安装nagios-plugins”这篇文章就分享到这里了,希望以上内容可以对大家有一定的帮助,使各位可以学到更多知识,如果觉得文章不错,请把它分享出去让更多的人看到。

推荐阅读:
  1. Redhat6 安装postgresql
  2. RedHat7 配置VNCServer

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

redhat nagios

上一篇:Ubuntu9.04安装后如何设置开通root登录

下一篇:Mysql数据分组排名实现的示例分析

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》