Mutiple line output in status information?


#1

In nagios 2.x, I used to be able to get multiple lines of output in the status information area of the web interface by adding a
in the output line generated by my check scripts, which would nicely split the output onto a new line. Now that does not work in 3.02.

I have read about $LONGSERVICEOUTPUT$ but I can’t figure out where I would use it, or if it would be applicable in this case.

So the question is whether it is still possible to get two or more lines of status information for a service to show up on the web page, and if so, how?

Thanks!


#2

One thought… This might be a result of “illegal_macro_output_chars=`~$&|’”<>" in nagios.cgi, although it doesn’t mention whether or not the characters are stripped before $SERVICEOUTPUT$ is presented on the web interface - I’d expect you would still see the “br” (i.e. without the encapsulating <>) in your output if that was the case

[blockquote]# ILLEGAL MACRO OUTPUT CHARACTERS

This option allows you to specify illegal characters that are

stripped from macros before being used in notifications, event

handlers, etc. This DOES NOT affect macros used in service or

host check commands.

The following macros are stripped of the characters you specify:

$HOSTOUTPUT$

$HOSTPERFDATA$

$HOSTACKAUTHOR$

$HOSTACKCOMMENT$

$SERVICEOUTPUT$

$SERVICEPERFDATA$

$SERVICEACKAUTHOR$

$SERVICEACKCOMMENT$[/blockquote]

HTH

/S


#3

Good thought, but that wasn’t the case. It printed the whole
in the output. However, your suggestion did lead me on a different search path, and I found the answer:
In cgi.cfg, I changed escape_html_tags=1 to 0, and reloaded. That fixed it.

So I have my answer. Thanks!