Nagios错误解决案例

错误1、在nagios页面中,有个Map链接,一点开就报错:
The requested URL /nagios/cgi-bin/statusmap.cgi was not found on this server
--解决:
statusmap.cgi依赖gd开发包
通过yum安装gd开发包,然后重新编译configuration及make nagios cgi部分
yum -y install gd gd-devel
./configure --with-gd-lib=/usr/lib  --with-gd-inc=/usr/include
#make all
#make install
#make install-init
#make install-config
#make install-commandmode
make  install-config

2】普通用户(除nagiosadmin外所有用户)点nagios页面中的service等链接,都出现如下错误:
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.
---原因:
认证用户不正确,编辑etc/cgi.cfg,该文件里默认的是nagiosadmin,如果新建的用户要想查看的话,得添加进去,多用户用逗号分开
authorized_for_system_information=nagiosadmin
authorized_for_configuration_information=nagiosadmin
authorized_for_system_commands=nagiosadmin
authorized_for_all_services=nagiosadmin
authorized_for_all_hosts=nagiosadmin
authorized_for_all_service_commands=nagiosadmin
authorized_for_all_host_commands=nagiosadmin
如果不是 nagiosadmin 需要到后面添加,例子 authorized_for_system_information=nagiosadmin,admin

3】如果提示“Whoops!  Error: Could not read object configuration data! ”,这是因为没有启动nagios后台进程,执行以下命令
解决方法:/usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/ff9685a1dcdbeee8192a9f90d4ed9a5f.html