Page 1 of 1

[Nagios-devel] strange behaviour when plugin output is containing

Posted: Thu Dec 27, 2007 2:35 am
by Guest
Hi,

if a plugin is containing the string "\n" in its output I found some strange
output in status_file. For example if the output of the plugin looks like this:

# some_plugin
test\ntmon\test\abc
# echo $?
0
#

the status_file for this service is containing lines like this:

servicestatus {
...
...
plugin_output=test\
long_plugin_output=tmon\\\\test\\\\abc\n
...
...
}

Also the trailing \ in plugin_output line sometimes seems to confuse the CGI's
in a way that they are dumping:

# setenv REQUEST_METHOD POST
# setenv CONTENT_LENGTH 4
# echo all | ./tac.cgi
Segmentation fault (core dumped)

Is this a bug in Nagios or is it not allowed that the plugin output contains \n?

Thanks and regards
Marcus






This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]