备注: 监控linux,测试是否连通,在windows机器上安装后,在监控服务器端输入命令 测试是否可以连通:(-H后面是监控服务器的IP) [root@localhost libexec]# ./check_nt -H 113.143.***.*** -p12489 -v CLIENTVERSION [root@localhost libexec]# ./check_nt -H 113.143.***.*** -p12489 -v UPTIME 来测试是否可以连通。 4.nagios登陆报错 Authorization Required
his server could not verify that you are authorized to access the document requested. Either you supplied the wrong credentials (e.g., bad password), or your browser doesn't understand how to supply the credentials required.
查看httpd.conf文件最下面的路径是否正确
正确路径应该是: AuthUserFile /usr/local/nagios/etc/htpasswd.users
有2个这个路径。
修改后重新启动,httpd和nagios都要重启。
如果还不行,分析如下问题:
查看配置文件
vi /etc/httpd/conf.d/nagios.conf
cd /usr/local/nagios/etc
查看文件,原来这个.users文件的权限是root,可能apache访问不了哟。修改下试试
-rw-r--r-- 1 root root 26 12月 23 15:51 htpasswd.users
查看apache日志
cd /var/log/httpd
tail -f error_log,登陆的时候报错如下:
[Wed Dec 23 16:22:38 2009] [error] [client 10.206.19.254] (13)Permission denied: Could not open password file: /usr/local/nagios/etc/htpasswd.users
网上说是selinux的原因,于是我做如下操作关闭selinux
命令:setenforce 0
再次访问就OK了,可以正常登陆,但是点击某些页面时有如下提示:
It appears as though you do not have permission to view information for any of the hosts you requested...
vi /usr/local/nagios/etc/cgi.cfg
修改use_authentication=1为use_authentication=0
service nagios restart 重启后就OKl了:)
以上摘自:http://sillycat.iteye.com/blog/562659