Open tomaszdubiel18 opened 3 years ago
Trying with \\n didnt change service status details output and now output in Mine Map is as folllows:
I think it can be related bug. Look at last comment. https://github.com/naemon/naemon-core/issues/144
I thought maybe using api (instead of direct invoking of submit_check_result) could workaround that, but no luck. I tried it like this:
curl -k -H "X-Thruk-Auth-Key: $THRUK_API_KEY_MYKEY" \
-d "cmd=process_service_check_result" \
-d "host=my_test_host" \
-d "service=my_test_service" \
-d "plugin_output=red\nthis" \
-d "plugin_state=2" \
'https://example.org/thruk/r/cmd'
In the status.cgi page (the observe page where hosts with their services are shown) in the plugin output I see the text "red\nthis". But I noticed that in the extinfo.cgi (the dedicated page for that service), the text in Status Information is shown correctly with several lines.
I think I could close this issue. Switching from '\n' to html tag br solved the problem.
For <br> to work, in cgi.cfg you need to set escape_html_tags = 0.
It can be used as solution. But still the \n variant is broken. I am not sure if that should be fixed from the thruk or in naemon bug from your link.
@sni, how do you think? Close it or not?
@sni, please come back to this issue. After seeing closed issue for Naemon: https://github.com/naemon/naemon-core/issues/387 I updated it, checked whether something had changed, but still - there is wrong multiline output in Service Status Details.
I remind "Expected behavior In 2.42 the output was underlined and the full formatted output was available on click"
Describe the bug Wrong display of multiline output. Its Naemon installation.
Thruk Version Thruk 2.44.3
To Reproduce Open Service status details
Expected behavior In 2.42 the output was underlined and the full formatted output was available on click
Screenshots The output in Mine Map is properly formatted.
Desktop (please complete the following information): Firefox
Additional context Add any other context about the problem here.