Page 1 of 1

Web GUI, Service Details with only first line of output

Posted: Thu Jun 27, 2013 6:11 am
by test541
Hello,
I use check_by_ssh plugin to execute remote scripts and grab their output.
Example is:

Code: Select all

GL:0504:/home GLOBUS GL.OS.fs critical Capacity of /home is 59 % ( > 50 %)
GL:0504:/opt GLOBUS GL.OS.fs critical Capacity of /opt is 52 % ( > 50 %)
But when I look at Service Details menu and "Status Information" column I can see only first line.
After clicking "Service Status Detail" I can see first line bolded and other lines with regular font.

How to display whole information in "Status Information" field :?:

Executing the plugin command from shell on nagios server I got all lines of the output. Only Web interface displays output with this strange rule.
Any tries of parsing event in "command" (via piping with "tr") were unsuccessful, ie. parsing works OK, but the result is displayed as described before.
I can merge all output in one line in script body, but it is not well redable for human.
Thx.

Re: Web GUI, Service Details with only first line of output

Posted: Thu Jun 27, 2013 9:43 am
by slansing
As far as viewing multiline output, this would be hard to do from the service list, you will have to open the service to view the additional lines. If data is getting cut off inside the details page you would need to increase the max length:
Nagios will only read the first 4 KB of data that a plugin returns. This is done in order to prevent runaway plugins from dumping megs or gigs of data back to Nagios. This 4 KB output limit is fairly easy to change if you need. Simply edit the value of the MAX_PLUGIN_OUTPUT_LENGTH definition in the include/nagios.h.in file of the source code distribution and recompile Nagios. There's nothing else you need to change!

Re: Web GUI, Service Details with only first line of output

Posted: Fri Jun 28, 2013 10:12 am
by test541
My problem is not related to output size because it's only about 500 bytes instead 4KB. Details page has all the content.

Is it impossible to have multiline on service list screen?

Re: Web GUI, Service Details with only first line of output

Posted: Fri Jun 28, 2013 1:27 pm
by abrist
test541 wrote:Is it impossible to have multiline on service list screen?
This currently not possible as it would wreck havoc on the UI CSS.