Page 1 of 2
How to Increase text characters to view the output
Posted: Mon Dec 17, 2012 6:23 am
by gm_rajkumar
Hi,
I am receiving the output of disk information, it consists of 3 lines ( 200 characters). I wanted to increase text characters in Nagios XI, where exactly go and edit it.
MAX_PLUGIN_OUTPUT_LENGTH - i have referred some of online stuff for this, i dont know whether its valid and how to do that. In which path and where exactly we should change this value. please let me know, thanks!!
Regards,
Raj.
Re: How to Increase text characters to view the output
Posted: Mon Dec 17, 2012 5:37 pm
by 455157
Are you looking for this to display in the Host/Service Detail? I'm not sure how to do this. Maybe it wouldn't be helpful, as each item in the overview would take up maybe a lot of space.
However, you can see many lines of output if you click through to the Host/ Service Status Detail for the individual metric !
Re: How to Increase text characters to view the output
Posted: Mon Dec 17, 2012 6:00 pm
by slansing
To receive all of that returned data you can not have line breaks, line breaks cause the information to be truncated at that point so you will either have to move all of the status information to one line, or include HTML tags in the output to combine it.
Re: How to Increase text characters to view the output
Posted: Mon Dec 17, 2012 10:56 pm
by gm_rajkumar
I have enclosed the printer consumed status output for your reference, i can see few of information some of results were truncated. Is there any possibility to change value to see the full information.. hope this is very useful to others too.. thanks!
Regards,
Raj.
Re: How to Increase text characters to view the output
Posted: Tue Dec 18, 2012 8:24 am
by scottwilkerson
The full output should be available if you click on the service name and go to the service detail page.
Re: How to Increase text characters to view the output
Posted: Tue Dec 18, 2012 10:01 pm
by gm_rajkumar
In sevice detail also, im not seeing the full output result. Few of information some of results are truncated. Do you mean its not possible to view results???
Im really disappointed............
Regards,
Raj

Re: How to Increase text characters to view the output
Posted: Wed Dec 19, 2012 8:58 am
by scottwilkerson
Are you saying the service detail page is truncated too?
If so it could be the plugin or how it is processing the data. What plugin are you using? Was this from the printer wizard?
Re: How to Increase text characters to view the output
Posted: Wed Dec 19, 2012 7:09 pm
by jwelch
It looks like you are stuffing all the output into one unbroken line, which is pretty ugly on the main page. I would try putting a short summary on the first line, then the details in the subsequent lines. However, if you are using passive checks and sending the data directly to nagios.cmd, the formatting of the data is a little tricky. I found that I had to escape the newline characters in the check output before I sent them to nagios.cmd. So instead of writing the following to nagios.cmd:
"OK - Some Bogus check\nThis is detail line 1.\nThis is detail line 2.\nThis is detail line 3.\n"
I had to escape the newlines and send the following to nagios.cmd: (note the final newline is NOT escaped)
"OK - Some Bogus check summary line\\nThis is detail line 1.\\nThis is detail line 2.\\nThis is detail line 3.\n"
The above would result in the main page showing "OK - Some Bogus check summary line" in the Status Information column of the main page and if I clicked on the service name to get to the Service Status Detail page, I would see
OK - Some Bogus check summary line
This is detail line 1.
This is detail line 2.
This is detail line 3.
That should get you what you want up to the 4k character default limit. Past that I understand you have to change a configuration to increase the amount of data that will be accepted for service check results.
Re: How to Increase text characters to view the output
Posted: Thu Dec 20, 2012 8:53 am
by scottwilkerson
Thanks jwelch!
Re: How to Increase text characters to view the output
Posted: Thu Dec 20, 2012 10:51 pm
by gm_rajkumar
I bit confused, where i have to give "\" line breaks. Is it in nagios.cmd or anyother cfg file. I am using the plugin name check_snmp.printer.pl
http://exchange.nagios.org/directory/Pl ... er/details, do you want me to update over that file or any other file... Please clarify...
Thanks!!
Raj.