Print more than one line output in nagios

Deadly 提交于 2021-01-05 11:23:55

问题


I have written a script and it is printing multiline output. But in nagios it is showing only one line. Does anyone know how to print multilines in Nagios


回答1:


Multiline ouput is possible only with Nagios 3 and newer.
First of all, you can use html tag <br/> for each new line of desired output.
Next important thing is disable HTML tag escaping in your cgi.cfg on Nagios server.
Find escape_html_tags=1 and change to escape_html_tags=0.
Then you restart Nagios server.

Some advice about Nagios plugins output can be found here: https://assets.nagios.com/downloads/nagioscore/docs/nagioscore/3/en/pluginapi.html

PS: By default Nagios will only read the first 4 KB of data that a plugin returns.



来源:https://stackoverflow.com/questions/45640167/print-more-than-one-line-output-in-nagios

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!