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

Nagios常见问题

[复制链接]

尚未签到

发表于 2019-1-16 11:50:59 | 显示全部楼层 |阅读模式
问题1:  It appears as though you do not have permission 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 use the authentication functionality of the CGIs.
  I don't want to be personally responsible for what may happen as a result of allowing unauthorized users to issue commands to Nagios,so you'll have to disable this safeguard if you are really stubborn and want to invite trouble.
  Read the section on CGI authentication in the HTML documentation to learn how you can enable authentication and why you 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 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.
  原因 : 认证用户不正确
  开启认证 认证的用户必须是 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-663971-1-1.html 上篇帖子: NAGIOS飞信报警 下篇帖子: Nagios 安装和配置
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

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

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

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

扫描微信二维码查看详情

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


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


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


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



合作伙伴: 青云cloud

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