设为首页 收藏本站
查看: 1076|回复: 0

nagios常见错误及页面错误

[复制链接]

尚未签到

发表于 2019-1-16 08:09:16 | 显示全部楼层 |阅读模式
nagios服务器问题1
我当时遇到奇怪现象,可以看到首页,链接打不开,检查apache配置,文件权限,后来确认当有部分程序出现奇怪状态,比如权限问题得时候,请关闭SELINUX
解决方法:
vi /etc/sysconfig/selinux
SELINUX=enforcing --> SELINUX=disabled
存盘退出




nagios服务器问题2
监控页面出现
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.
1、修改/etc/cgi.cfg
vi    /usr/local/nagios/cgi.cfg
use_authentication=1 #把1修改为0,保存
root@nagios#/etc/init.d/nagios restart






nagios服务器问题3
Warning: Return code of 127 for check of service 'Uptime' on host 'winserver' was out of bounds. Make sure the plugin you're trying to run actually exists
通常都的plugin没有安装,或者安装位置有问题,我遇到是查看目录:/usr/local/nagios/libexec/libexec、后来将libexec文件往前挪一下就可以了:/usr/local/nagios/libexec.

===================================
===================================
常见错误:
问题1:
It appears as though you do not havepermission to view information for any of the hosts you requested

临时解决:
sed -i 's/use_authentication=1/use_authentication=0/g'/usr/local/nagios/etc/cgi.cfg
(取消了认证 可以浏览主机状态 但是无法在 nagios web 执行外部命令 )

解决:
登陆 nagios web接口的用户
需要和 /usr/local/nagios/etc/cgi.cfg 里面配置的用户匹配
没有可以手动添加 用逗号隔开


问题2:

Sorry Dave, I can't let you do that...

It seems that you have chosen to not usethe authentication functionality of the CGIs.

I don't want to be personallyresponsible for what may happen as a result of allowing unauthorized users toissue commands to Nagios,so you'll have to disable this safeguard if you arereally stubborn and want to invite trouble.

Read the section on CGI authenticationin the HTML documentation to learn how you can enable authentication and whyyou should want to.

原因 : 未开启认证 开启认证可解决问题

编辑文件 /usr/local/nagios/etc/cgi.cfg
use_authentication 值设成1 (0/1 关闭/开启)
use_authentication=1
并重启 nagios
service nagios restart



问题3:


It appears as though you do not havepermission to view information for any of the hosts you requested...
If you believe this is an error, check theHTTP server authentication requirements for accessing this CGI
and check the authorization options in your CGI configuration file.




原因 : 认证用户不正确

开启认证 认证的用户必须是 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

问题4:
调用外部命令错误 可能权限不够

解决:

临时解决:
chown -R nagios.nagcmd/usr/local/nagios/var/rw
chmod -R 777 /usr/local/nagios/var/rw

为什么说临时解决 ? 因为重启nagios 权限会还原 还是没权限执行

解决:
在安装 nagios 就要把用户选对 然后再安装
./configure --with-group=nagios--with-user=nagios --with-command-group=nagcmd --with-gd-lib=/usr/lib--with-gd-inc=/usr/include
make all
make install
make install-init
make install-config
make install-commandmode

===

rw\nagios.cmd 权限是 nagios.nagios
还需要把 web用户 加入到 nagios组里 这样才有权限执行 nagios.cmd

问题5: 3D浏览错误 提示下载 statuswrl.cgi

解决: 需安装3D浏览插件

原因是未安装支持vrml 3D浏览的插件

vrml 面向对象的三维造型语言 需要安装 vrml 支持插件才能浏览

Cortona VRML Client 是一个优秀的VRML浏览插件
http://download.pcpop.com/Down/48664.html
http://down2.pcpop.com/softdown/exp/cortvrml.zip

问题6: 查看帮助文档时 无法看到图片

原因 url错误

图片源地址 http://nagios_ip/pub/images/reachability1.png
实际地址 /usr/local/nagios/share/docs/images/reachability1.png

解决
配置apache加入别名
Alias /pub "/usr/local/nagios/share/docs"

apachectl restart
重启apache 问题解决

=======







运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-663776-1-1.html 上篇帖子: 一线上nagios监控参数 下篇帖子: Nagios 监控平台快速安装
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表