为什么 nagios 没有在主页上呈现 html

为什么 nagios 没有在主页上呈现 html

我正在使用 nagios,我的配置文件如下report = html

输出如下

Current Status: 
  CRITICAL  
 (for 0d 0h 1m 54s)
Status Information: CRITICAL - (1 errors in secure.protocol-2013-07-19-13-06-07) - Jul 19 13:05:08 server sshd[24321]: input_userauth_request: invalid user pandu
<table style="border-collapse: collapse;"><tr valign="top"><td class="serviceCRITICAL">tag rootlogin</td></tr><tr valign="top"><td nowrap width="100%" class="serviceCRITICAL" style="border: 1px solid black;">Jul 19 13:05:08 server sshd[24321]: input_userauth_request: invalid user pandu</td></tr></table>
\n

我正在使用这个插件

http://labs.consol.de/lang/en/nagios/check_logfiles/

使用此选项

–report=[short|long|html]This option turns on multiline output (Default: off). The setting html generates a table which display the last hits in the service details view.

难道它不应该渲染它

答案1

找到 cgi.cfg,并查找“escape_html_tags”:

# ESCAPE HTML TAGS
# This option determines whether HTML tags in host and service
# status output is escaped in the web interface.  If enabled,
# your plugin output will not be able to contain clickable links.

escape_html_tags=1

相关内容