黑客技术群

黑客入侵,黑客基地,黑客组织,网站黑客,黑客平台

六大Nagios常见问题解决办法

Nagios常见问题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 内部配置的用户匹配,不能手动添加,用逗号分开。

Nagios常见问题2:

  • SorryDave,Ican'tletyoudothat...
  • ItseemsthatyouhavechosentonotusetheauthenticationfunctionalityoftheCGIs.
  • Idon'twanttobepersonallyresponsibleforwhatmayhappenasaresultofallowingunauthorizeduserstoissuecommandstoNagios,soyou'llhavetodisablethissafeguardifyouarereallystubbornandwanttoinvitetrouble.
  • ReadthesectiononCGIauthenticationintheHTMLdocumentationtolearnhowyoucanenableauthenticationandwhyyoushouldwantto.
  • 原因 : 未打开认证

    解决方案:打开认证可以解决问题,编辑文件 /usr/local/nagios/etc/cgi.cfg,将 use_authentication 值为1 (0/1 关闭/开启)use_authentication=1,并重启 nagios service nagios restart

    Nagios常见问题3:

  • Itappearsasthoughyoudonothavepermissiontoviewinformationforanyofthehostsyourequested...
  • Ifyoubelievethisisanerror,checktheHTTPserverauthenticationrequirementsforaccessingthisCGI
  • andchecktheauthorizationoptionsinyourCGIconfigurationfile.
  • 原因: 认证用户不正确

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

    Nagios常见问题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
  • makeall
  • makeinstall
  • makeinstall-init
  • makeinstall-config
  • makeinstall-commandmode
  • ===
  • rw agios.cmd 权限是 nagios.nagios,还需要把 web用户 加入 nagios只有这样,组才有权限执行 nagios.cmd

    Nagios常见问题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

    Nagios常见问题6:

    查看帮助文档时,看不到图片

    原因是url错误

    图片源地址 images/2022/reachability1.png

    实际地址 //usr/local/nagios/share/docs/images/reachability1.png

    解决:配置apache加入别名

    Alias /pub "/usr/local/nagios/share/docs"

    apachectl restart

    重启apache 问题解决

    nagios你学会了这些常见的问题和解决办法吗?我相信这是一个非常有用的资源。我希望这些方法能帮助你解决问题。

       
    • 评论列表:
    •  纵遇婳悕
       发布于 2022-06-03 15:23:13  回复该评论
    • information=nagiosadminauthorized_for_configuration_information=nagiosadminauthorized_for_system_commands=nagiosadminauthori

    发表评论:

    Powered By

    Copyright Your WebSite.Some Rights Reserved.