Closed atc0005 closed 2 years ago
Brief testing indicates that replacing \r\n
with just \n
works as intended on Nagios XI, but results in literal \n
values showing up on some lines of the output in the web UI on Nagios Core (3.x at least). The current doc comments explain this as reasoning for using \r\n
as a workaround.
This however seems to work as intended:
-const CheckOutputEOL string = "\r\n"
+const CheckOutputEOL string = " \n"
Note the additional single leading whitespace before the \n
value.
https://github.com/atc0005/go-nagios/blob/2d7c3b12122ff43f5ead36f3077c2a01f1403bd3/nagios.go#L43-L49
Nagios Core interprets the
CheckOutputEOL
value as intended, but Nagios XI interprets as two newlines.Snippet from service check output as shown by the web UI (Nagios XI):
It should be: