Web GUI, Service Details with only first line of output

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
test541
Posts: 14
Joined: Wed May 22, 2013 4:20 am

Web GUI, Service Details with only first line of output

Post 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.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

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

Post 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!
test541
Posts: 14
Joined: Wed May 22, 2013 4:20 am

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

Post 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?
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

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

Post 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.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Locked