It appears as though you do not have permission to view information for any of the NAGIOS 解决方案

nagios 打开web 查看监控时,发现没有监控并报错:

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

 

是因为cgi.cfg 的用户名不与 htpasswd 用户名匹配,出于安全考虑并不与显示监控

修改 nagios/etc/cgi.cfg 文件即可

题主用户名为nagios,在句子尾部即可
authorized_for_system_information=nagiosadmin,nagios
authorized_for_configuration_information=nagiosadmin,nagios
authorized_for_system_commands=nagiosadmin,nagios
authorized_for_all_services=nagiosadmin,nagios
authorized_for_all_hosts=nagiosadmin,nagios
authorized_for_all_service_commands=nagiosadmin,nagios
authorized_for_all_host_commands=nagiosadmin,nagios

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
### 回答1: This message usually appears when you are trying to view an XML file in a web browser and the browser is unable to find any associated stylesheet information. The XML file may contain structured data, but without a stylesheet, the browser is unable to display it in a readable format. To resolve this issue, you can do the following: 1. Add a stylesheet: You can add a stylesheet (such as an XSLT file) to the XML file that specifies how the data should be displayed. This will allow the browser to render the XML file correctly. 2. Use a different tool: If you do not want to add a stylesheet to the XML file, you can use a different tool to view the data. For example, you can use a text editor or a specialized XML editor to view the data. 3. Convert the XML file: You can convert the XML file to another format, such as HTML or PDF, that can be easily viewed in a web browser. These are the most common ways to resolve the issue of an XML file not having any style information associated with it. The specific solution that you choose will depend on your needs and the requirements of your project. ### 回答2: 这个提示意味着XML文件没有与之相关联的样式信息。要解决这个问题,您可以采取以下几个步骤: 1. 确认XML文件是否正确:首先,您需要确保XML文件本身是有效的,并且不包含任何语法错误。您可以使用XML验证工具或在线XML验证服务来验证您的XML文件。 2. 关联样式表:XML文件通常需要使用样式表(比如XSLT)来定义其显示样式。您需要将样式表与XML文件关联起来,以便正确显示内容。可以通过在XML文件中使用样式表声明语句来关联样式表。例如,可以使用`<?xml-stylesheet ?>`注释指定XSLT样式表的位置。 3. 引用外部样式表:还可以将样式定义保存在外部样式表文件中,然后在XML文件中引用该样式表。使用`<?xml-stylesheet ?>`注释来指定外部样式表文件的位置。 4. 使用CSS样式:如果您希望为XML文件应用CSS样式,则需要使用XSLT样式表将XML转换为HTML,并在HTML文件中使用CSS样式。您可以创建一个包含所需样式的XSLT文件,并在XML文件中指定该XSLT文件。 综上所述,要解决此问题,您需要确保XML文件有效且无语法错误,然后关联或引用相应的样式表,以便为XML文件提供样式信息。 ### 回答3: 这个错误提示是由于在XML文件中没有与之相关联的样式信息引起的。要解决这个问题,你可以采取以下几个步骤: 1. 确认XML文件的格式是否正确:检查XML文件的结构和语法是否正确。确保所有标签都正确闭合,并没有错误的字符或格式。 2. 检查XML文件中是否有相关的CSS或XSL链接:要渲染XML文件,通常需要与之相关联的CSS或XSL样式表。确保XML文件中存在正确的样式表链接,并且这些样式表文件存在并且是可访问的。 3. 创建新的样式表或链接已有的样式表:如果XML文件中没有相关的样式表链接,你可以创建一个新的样式表文件并将其与XML文件关联。或者,你可以查看是否已经存在适用于该XML文件的样式表,并将其链接到XML文件中。 4. 使用浏览器插件或工具:如果你只是想快速查看XML文件的内容,你可以尝试使用浏览器插件或在线工具,这些工具可以自动处理XML文件的样式,并为其提供适当的渲染。 总之,要解决这个错误,你需要确认XML文件的格式是否正确,并确保存在或创建相关的样式表链接,以便正确渲染XML文件。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值