nagios错误

 监控页面出现

It appears as though you do not have permission to view information for any of the hosts you requested... 


If you believe this is an error, check the HTTP server authentication requirements for accessing this CGI 
and check the authorization options in your CGI configuration file.

解决办法,修改/usr/local/nagios/etc/cgi.cfg
# vi /usr/local/nagios/etc/cgi.cfg

找到use_authentication=1,将1修改为0,保存退出。
# service nagios restart
原来nagios为了保障系统的安全性,nagios设置了这个参数,默认为1,改为0即可。

重启nagios服务后页面恢复正常。 

################################

我是这种方法修改正常,网上还有种方法

 

将之前创建的账号添加到cgi.cfg文件中的权限配置文件中去,一般包括如下的几个项目:

(如果你之前在htpasswd.user里设置的账号是admin,则如下修改cgi.cfg文件)
authorized_for_system_information=nagiosadmin,admin
authorized_for_configuration_information=nagiosadmin,admin
authorized_for_system_commands=nagiosadmin,admin
authorized_for_all_services=nagiosadmin,admin
authorized_for_all_hosts=nagiosadmin,admin
authorized_for_all_service_commands=nagiosadmin,admin
authorized_for_all_host_commands=nagiosadmin,admin
直接在nagiosadmin后面加逗号和账户名即可,也可以根据不同的账户来分配不同的权限。具体的权限可以参照http://nagios_IP/nagios/docs/cgiauth.html.

 

你可能感兴趣的:(监控,linux软件)