Is there an easy way to raise the output limit for check plugins? It looks like the current limit is 4k.
(cut and paste the truncated output html from the frame into a file and checking the size I see
around 5200 bytes...but there may be some overhead I didn't see)
I'd like to raise that to 8k (maybe 16k) for a BigIP plugin that creates a lot of data for some VIPs
that have many pools and httpclassprofiles. The only info I've found so far requires recompiling nagios.
I tried searching the forums but may not have used the correct keywords.
plugin output size limit
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: plugin output size limit
This would require recompiling Nagios to my knowledge, we do not provide a guide to this as the changes are made along side objects that could ruin your installation if you made them locally, but we can do our best to help you.. can you link the guide you found?
Re: plugin output size limit
I could have sworn that 3.0 increased the plugin capability from 4kb to 8kb. (still too small for my needs, but better than nothing)
I just found the following in the pluginapi guide. ( http://nagios.sourceforge.net/docs/3_0/pluginapi.html )
---
Plugin Output Length Restrictions
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!
---
I just found the following in the pluginapi guide. ( http://nagios.sourceforge.net/docs/3_0/pluginapi.html )
---
Plugin Output Length Restrictions
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: plugin output size limit
You are correct - the change is listed here:
http://www.nagios.org/projects/nagiosco ... ry/core-3x
http://www.nagios.org/projects/nagiosco ... ry/core-3x
3.0b6 - 10/31/2007
...
Increased max plugin output length cap from 4kb to 8kb
...
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: plugin output size limit
In case I didn't mention it. The plugin I'm writing collects the data, then returns it's status as the plugin output (a single line) and submits the rest of the output
as passive results for the various VIPs that we have configured. (Not sure if that is important or not).
The raw output I'm submitting (shortened version for testing) is 7926 bytes. The cutoff that I see in the Nagiox XI 'Service Status Detail' page is at 4724 bytes.
(I don't want to post the output here as it is full of hostnames/IPs/etc...)
(I'm counting the output I'm submitting starting with "[1364505864] PROCESS_SERVICE_CHECK_RESULT;")
There's some html formating in the output (which I'm including in the count).
Is there something else in XI that is limiting the output or is XI compiled with a limit under 8k?\
It would really be nice if the compile limit were set fairly large and a user configurable soft setting truncated the output at the desired threshold. To have to re-compile nagios defeats our goal of using a standard tool. (as standard as possible, anyway)
as passive results for the various VIPs that we have configured. (Not sure if that is important or not).
The raw output I'm submitting (shortened version for testing) is 7926 bytes. The cutoff that I see in the Nagiox XI 'Service Status Detail' page is at 4724 bytes.
(I don't want to post the output here as it is full of hostnames/IPs/etc...)
(I'm counting the output I'm submitting starting with "[1364505864] PROCESS_SERVICE_CHECK_RESULT;")
There's some html formating in the output (which I'm including in the count).
Is there something else in XI that is limiting the output or is XI compiled with a limit under 8k?\
It would really be nice if the compile limit were set fairly large and a user configurable soft setting truncated the output at the desired threshold. To have to re-compile nagios defeats our goal of using a standard tool. (as standard as possible, anyway)
Re: plugin output size limit
Yes, currently Nagios Core and Ndoutils have a cutoff of 8k for plugin output. In XI we truncate the output at 4k because we have to process the data for XML formatting, and we found that with larger plugin output with lots of meta characters it can actually segfault PHP.Is there something else in XI that is limiting the output or is XI compiled with a limit under 8k?\
Having output larger than 4k or even 8k somewhat sidesteps the purpose of a Nagios plugin. The idea for a Nagios plugin is to check a single thing, and ideally only return 1 or a few lines of output. Is it plausible to break this check into multiple checks somehow?
Re: plugin output size limit
This *is* one thing. It's a Virtual IP. However it's composed of several elements. While it would be possible to setup a check for each of them, it would be a PITA to manage. This single IP hosts several virtual servers (one for each port) and each virtual server uses one or more pools, each of which use one or more servers. I'm collecting all the data at once using the API, the sumarizing it for each VIP in a format that lets you see what's wrong at a glance. I just can't put that in a single line.
Even just saying there's something wrong, go look at the BigIP doesn't help, because the BigIp doesn't give you the overall picture by VIP, you have to figure out
which VSs are using that IP and look at each of them.
Here's a sanitized sample output:
(I had to add <BR>s to most of the lines to get it to look right in my browser.)
(I don't know if the html will render here, but if you paste the output into file.html and open it with firefox you will see what I'm trying to do.)
[1364505864] PROCESS_SERVICE_CHECK_RESULT;myvip.my.domain;BigIP;0;Problems with pools: myserver.my.domain_http, myvip.my.domain-submission<br>
This report generated by check_bigip_vips on mynagios.my.domain from mybigip.my.domain at Thu Mar 28 17:24:24 2013.<br><br>
<FONT COLOR="#000000">myvip.my.domain (1.2.3.666)</FONT><br>
<br><FONT COLOR="#CD9B1D"> PORT 443 (vip_myvip.my.domain_https) (ENABLED) The virtual server is available</FONT><br>
<FONT COLOR="#008000"> Default Pool: myserver.my.domain_http () (ENABLED) The pool is available</FONT><br>
<FONT COLOR="#008000">   myvip.my.domain:443 -> myserver1.my.other.domain:80 [0] (ENABLED) (UP) Pool member is available</FONT><br>
<FONT COLOR="#008000">   myvip.my.domain:443 -> myserver2.my.other.domain:80 [0] (ENABLED) (UP) Pool member is available</FONT><br>
<FONT COLOR="#008000">   myvip.my.domain:443 -> myserver3.my.other.domain:80 [0] (ENABLED) (UP) Pool member is available</FONT><br><br>
HttpClassProfile cobra-urserver:<br>
<FONT COLOR="#CD9B1D"> Pool: somepool-pool (round_robin) (ENABLED) The pool is available</FONT><br>
<FONT COLOR="#FF0000">  myvip.my.domain:443   ->   myserver10.my.domain:8081 [0] (ENABLED) (DOWN) Pool member has been marked down by a monitor</FONT><br>
<FONT COLOR="#008000">  myvip.my.domain:443   ->   urserver1.my.other.domain:80 [0] (ENABLED) (UP) Pool member is available</FONT><br>
<FONT COLOR="#008000">  myvip.my.domain:443   ->   urserver2.my.other.domain:80 [0] (ENABLED) (UP) Pool member is available</FONT><br>
<FONT COLOR="#008000">  myvip.my.domain:443   ->   urserver3.my.other.domain:80 [0] (ENABLED) (UP) Pool member is available</FONT><br><br>
HttpClassProfile cobra-urserver-cas:<br>
<FONT COLOR="#CD9B1D"> Pool: urserver-cas (round_robin) (ENABLED) The pool is available</FONT><br>
<FONT COLOR="#FF0000">  myvip.my.domain:443   ->   urserver10.my.domain:8081 [0] (ENABLED) (DOWN) Pool member has been marked down by a monitor</FONT><br>
<FONT COLOR="#008000">  myvip.my.domain:443   ->   urserver1.my.other.domain:80 [0] (ENABLED) (UP) Pool member is available</FONT><br>
<FONT COLOR="#008000">  myvip.my.domain:443   ->   urserver2.my.other.domain:80 [0] (ENABLED) (UP) Pool member is available</FONT><br>
<FONT COLOR="#008000">  myvip.my.domain:443   ->   urserver3.my.other.domain:80 [0] (ENABLED) (UP) Pool member is available</FONT><br>
<br><FONT COLOR="#008000"> PORT 465 (myvip.my.domain-smtps) (ENABLED) The virtual server is available</FONT><br>
<FONT COLOR="#008000"> Default Pool: myvip.my.domain-smtps () (ENABLED) The pool is available</FONT><br>
<FONT COLOR="#008000">   myvip.my.domain:465 -> urserver1.my.domain:465 [0] (ENABLED) (UP) Pool member is available</FONT><br>
<FONT COLOR="#008000">   myvip.my.domain:465 -> urserver2.my.domain:465 [0] (ENABLED) (UP) Pool member is available</FONT><br>
<FONT COLOR="#008000">   myvip.my.domain:465 -> urserver3.my.domain:465 [0] (ENABLED) (UP) Pool member is available</FONT><br>
<FONT COLOR="#008000">   myvip.my.domain:465 -> urserver4.my.domain:465 [0] (ENABLED) (UP) Pool member is available</FONT><br>
<FONT COLOR="#008000">   myvip.my.domain:465 -> urserver5.my.domain:465 [0] (ENABLED) (UP) Pool member is available</FONT><br>
<FONT COLOR="#008000">   myvip.my.domain:465 -> urserver6.my.domain:465 [0] (ENABLED) (UP) Pool member is available</FONT><br>
<FONT COLOR="#008000">   myvip.my.domain:465 -> urserver7.my.domain:465 [0] (ENABLED) (UP) Pool member is available</FONT><br>
<FONT COLOR="#008000">   myvip.my.domain:465 -> urserver8.my.domain:465 [0] (ENABLED) (UP) Pool member is available</FONT><br>
<FONT COLOR="#008000">   myvip.my.domain:465 -> urserver9.my.domain:465 [0] (ENABLED) (UP) Pool member is available</FONT><br>
<FONT COLOR="#FF0000">   myvip.my.domain:465 -> urserver10.my.domain:465 [0] (ENABLED) (DOWN) Pool member has been marked down by a monitor</FONT><br>
<br><FONT COLOR="#CD9B1D"> PORT 587 (myvip.my.domain-submission) (ENABLED) The virtual server is available</FONT><br>
<FONT COLOR="#CD9B1D"> Default Pool: myvip.my.domain-submission () (ENABLED) The pool is available</FONT><br>
<FONT COLOR="#008000">   myvip.my.domain:587 -> urserver1.my.domain:587 [0] (ENABLED) (UP) Pool member is available</FONT><br>
<FONT COLOR="#008000">   myvip.my.domain:587 -> urserver2.my.domain:587 [0] (ENABLED) (UP) Pool member is available</FONT><br>
<FONT COLOR="#008000">   myvip.my.domain:587 -> urserver3.my.domain:587 [0] (ENABLED) (UP) Pool member is available</FONT><br>
<FONT COLOR="#008000">   myvip.my.domain:587 -> urserver4.my.domain:587 [0] (ENABLED) (UP) Pool member is available</FONT><br>
<FONT COLOR="#008000">   myvip.my.domain:587 -> urserver5.my.domain:587 [0] (ENABLED) (UP) Pool member is available</FONT><br>
<FONT COLOR="#008000">   myvip.my.domain:587 -> urserver6.my.domain:587 [0] (ENABLED) (UP) Pool member is available</FONT><br>
<FONT COLOR="#008000">   myvip.my.domain:587 -> urserver7.my.domain:587 [0] (ENABLED) (UP) Pool member is available</FONT><br>
<FONT COLOR="#008000">   myvip.my.domain:587 -> urserver8.my.domain:587 [0] (ENABLED) (UP) Pool member is available</FONT><br>
<FONT COLOR="#008000">   myvip.my.domain:587 -> urserver9.my.domain:587 [0] (ENABLED) (UP) Pool member is available</FONT><br>
<FONT COLOR="#FF0000">   myvip.my.domain:587 -> urserver10.my.domain:587 [0] (ENABLED) (DOWN) Pool member has been marked down by a monitor</FONT><br>
<br><FONT COLOR="#008000"> PORT 80 (vip_urserver.my.other.domain_http) (ENABLED) The virtual server is available</FONT><br>
<FONT COLOR="#008000"> Default Pool: myserver.my.domain_http () (ENABLED) The pool is available</FONT><br>
<FONT COLOR="#008000">   myvip.my.domain:80 -> myserver1.my.other.domain:80 [0] (ENABLED) (UP) Pool member is available</FONT><br>
<FONT COLOR="#008000">   myvip.my.domain:80 -> myserver2.my.other.domain:80 [0] (ENABLED) (UP) Pool member is available</FONT><br>
<FONT COLOR="#008000">   myvip.my.domain:80 -> myserver3.my.other.domain:80 [0] (ENABLED) (UP) Pool member is available</FONT><br>
<br><FONT COLOR="#008000"> PORT 993 (myvip.my.domain-imaps) (ENABLED) The virtual server is available</FONT><br>
<FONT COLOR="#008000"> Default Pool: myvip.my.domain-imaps () (ENABLED) The pool is available</FONT><br>
<FONT COLOR="#008000">   myvip.my.domain:993 -> myserver1.my.other.domain:993 [0] (ENABLED) (UP) Pool member is available</FONT><br>
<FONT COLOR="#008000">   myvip.my.domain:993 -> myserver2.my.other.domain:993 [0] (ENABLED) (UP) Pool member is available</FONT><br>
<FONT COLOR="#008000">   myvip.my.domain:993 -> myserver3.my.other.domain:993 [0] (ENABLED) (UP) Pool member is available</FONT><br>
<br><FONT COLOR="#008000"> PORT 995 (myvip.my.domain-pops) (ENABLED) The virtual server is available</FONT><br>
<FONT COLOR="#008000"> Default Pool: myvip.my.domain-pops () (ENABLED) The pool is available</FONT><br>
<FONT COLOR="#008000">   myvip.my.domain:995 -> myserver1.my.other.domain:995 [0] (ENABLED) (UP) Pool member is available</FONT><br>
<FONT COLOR="#008000">   myvip.my.domain:995 -> myserver2.my.other.domain:995 [0] (ENABLED) (UP) Pool member is available</FONT><br>
<FONT COLOR="#008000">   myvip.my.domain:995 -> myserver3.my.other.domain:995 [0] (ENABLED) (UP) Pool member is available</FONT><br>
Even just saying there's something wrong, go look at the BigIP doesn't help, because the BigIp doesn't give you the overall picture by VIP, you have to figure out
which VSs are using that IP and look at each of them.
Here's a sanitized sample output:
(I had to add <BR>s to most of the lines to get it to look right in my browser.)
(I don't know if the html will render here, but if you paste the output into file.html and open it with firefox you will see what I'm trying to do.)
[1364505864] PROCESS_SERVICE_CHECK_RESULT;myvip.my.domain;BigIP;0;Problems with pools: myserver.my.domain_http, myvip.my.domain-submission<br>
This report generated by check_bigip_vips on mynagios.my.domain from mybigip.my.domain at Thu Mar 28 17:24:24 2013.<br><br>
<FONT COLOR="#000000">myvip.my.domain (1.2.3.666)</FONT><br>
<br><FONT COLOR="#CD9B1D"> PORT 443 (vip_myvip.my.domain_https) (ENABLED) The virtual server is available</FONT><br>
<FONT COLOR="#008000"> Default Pool: myserver.my.domain_http () (ENABLED) The pool is available</FONT><br>
<FONT COLOR="#008000">   myvip.my.domain:443 -> myserver1.my.other.domain:80 [0] (ENABLED) (UP) Pool member is available</FONT><br>
<FONT COLOR="#008000">   myvip.my.domain:443 -> myserver2.my.other.domain:80 [0] (ENABLED) (UP) Pool member is available</FONT><br>
<FONT COLOR="#008000">   myvip.my.domain:443 -> myserver3.my.other.domain:80 [0] (ENABLED) (UP) Pool member is available</FONT><br><br>
HttpClassProfile cobra-urserver:<br>
<FONT COLOR="#CD9B1D"> Pool: somepool-pool (round_robin) (ENABLED) The pool is available</FONT><br>
<FONT COLOR="#FF0000">  myvip.my.domain:443   ->   myserver10.my.domain:8081 [0] (ENABLED) (DOWN) Pool member has been marked down by a monitor</FONT><br>
<FONT COLOR="#008000">  myvip.my.domain:443   ->   urserver1.my.other.domain:80 [0] (ENABLED) (UP) Pool member is available</FONT><br>
<FONT COLOR="#008000">  myvip.my.domain:443   ->   urserver2.my.other.domain:80 [0] (ENABLED) (UP) Pool member is available</FONT><br>
<FONT COLOR="#008000">  myvip.my.domain:443   ->   urserver3.my.other.domain:80 [0] (ENABLED) (UP) Pool member is available</FONT><br><br>
HttpClassProfile cobra-urserver-cas:<br>
<FONT COLOR="#CD9B1D"> Pool: urserver-cas (round_robin) (ENABLED) The pool is available</FONT><br>
<FONT COLOR="#FF0000">  myvip.my.domain:443   ->   urserver10.my.domain:8081 [0] (ENABLED) (DOWN) Pool member has been marked down by a monitor</FONT><br>
<FONT COLOR="#008000">  myvip.my.domain:443   ->   urserver1.my.other.domain:80 [0] (ENABLED) (UP) Pool member is available</FONT><br>
<FONT COLOR="#008000">  myvip.my.domain:443   ->   urserver2.my.other.domain:80 [0] (ENABLED) (UP) Pool member is available</FONT><br>
<FONT COLOR="#008000">  myvip.my.domain:443   ->   urserver3.my.other.domain:80 [0] (ENABLED) (UP) Pool member is available</FONT><br>
<br><FONT COLOR="#008000"> PORT 465 (myvip.my.domain-smtps) (ENABLED) The virtual server is available</FONT><br>
<FONT COLOR="#008000"> Default Pool: myvip.my.domain-smtps () (ENABLED) The pool is available</FONT><br>
<FONT COLOR="#008000">   myvip.my.domain:465 -> urserver1.my.domain:465 [0] (ENABLED) (UP) Pool member is available</FONT><br>
<FONT COLOR="#008000">   myvip.my.domain:465 -> urserver2.my.domain:465 [0] (ENABLED) (UP) Pool member is available</FONT><br>
<FONT COLOR="#008000">   myvip.my.domain:465 -> urserver3.my.domain:465 [0] (ENABLED) (UP) Pool member is available</FONT><br>
<FONT COLOR="#008000">   myvip.my.domain:465 -> urserver4.my.domain:465 [0] (ENABLED) (UP) Pool member is available</FONT><br>
<FONT COLOR="#008000">   myvip.my.domain:465 -> urserver5.my.domain:465 [0] (ENABLED) (UP) Pool member is available</FONT><br>
<FONT COLOR="#008000">   myvip.my.domain:465 -> urserver6.my.domain:465 [0] (ENABLED) (UP) Pool member is available</FONT><br>
<FONT COLOR="#008000">   myvip.my.domain:465 -> urserver7.my.domain:465 [0] (ENABLED) (UP) Pool member is available</FONT><br>
<FONT COLOR="#008000">   myvip.my.domain:465 -> urserver8.my.domain:465 [0] (ENABLED) (UP) Pool member is available</FONT><br>
<FONT COLOR="#008000">   myvip.my.domain:465 -> urserver9.my.domain:465 [0] (ENABLED) (UP) Pool member is available</FONT><br>
<FONT COLOR="#FF0000">   myvip.my.domain:465 -> urserver10.my.domain:465 [0] (ENABLED) (DOWN) Pool member has been marked down by a monitor</FONT><br>
<br><FONT COLOR="#CD9B1D"> PORT 587 (myvip.my.domain-submission) (ENABLED) The virtual server is available</FONT><br>
<FONT COLOR="#CD9B1D"> Default Pool: myvip.my.domain-submission () (ENABLED) The pool is available</FONT><br>
<FONT COLOR="#008000">   myvip.my.domain:587 -> urserver1.my.domain:587 [0] (ENABLED) (UP) Pool member is available</FONT><br>
<FONT COLOR="#008000">   myvip.my.domain:587 -> urserver2.my.domain:587 [0] (ENABLED) (UP) Pool member is available</FONT><br>
<FONT COLOR="#008000">   myvip.my.domain:587 -> urserver3.my.domain:587 [0] (ENABLED) (UP) Pool member is available</FONT><br>
<FONT COLOR="#008000">   myvip.my.domain:587 -> urserver4.my.domain:587 [0] (ENABLED) (UP) Pool member is available</FONT><br>
<FONT COLOR="#008000">   myvip.my.domain:587 -> urserver5.my.domain:587 [0] (ENABLED) (UP) Pool member is available</FONT><br>
<FONT COLOR="#008000">   myvip.my.domain:587 -> urserver6.my.domain:587 [0] (ENABLED) (UP) Pool member is available</FONT><br>
<FONT COLOR="#008000">   myvip.my.domain:587 -> urserver7.my.domain:587 [0] (ENABLED) (UP) Pool member is available</FONT><br>
<FONT COLOR="#008000">   myvip.my.domain:587 -> urserver8.my.domain:587 [0] (ENABLED) (UP) Pool member is available</FONT><br>
<FONT COLOR="#008000">   myvip.my.domain:587 -> urserver9.my.domain:587 [0] (ENABLED) (UP) Pool member is available</FONT><br>
<FONT COLOR="#FF0000">   myvip.my.domain:587 -> urserver10.my.domain:587 [0] (ENABLED) (DOWN) Pool member has been marked down by a monitor</FONT><br>
<br><FONT COLOR="#008000"> PORT 80 (vip_urserver.my.other.domain_http) (ENABLED) The virtual server is available</FONT><br>
<FONT COLOR="#008000"> Default Pool: myserver.my.domain_http () (ENABLED) The pool is available</FONT><br>
<FONT COLOR="#008000">   myvip.my.domain:80 -> myserver1.my.other.domain:80 [0] (ENABLED) (UP) Pool member is available</FONT><br>
<FONT COLOR="#008000">   myvip.my.domain:80 -> myserver2.my.other.domain:80 [0] (ENABLED) (UP) Pool member is available</FONT><br>
<FONT COLOR="#008000">   myvip.my.domain:80 -> myserver3.my.other.domain:80 [0] (ENABLED) (UP) Pool member is available</FONT><br>
<br><FONT COLOR="#008000"> PORT 993 (myvip.my.domain-imaps) (ENABLED) The virtual server is available</FONT><br>
<FONT COLOR="#008000"> Default Pool: myvip.my.domain-imaps () (ENABLED) The pool is available</FONT><br>
<FONT COLOR="#008000">   myvip.my.domain:993 -> myserver1.my.other.domain:993 [0] (ENABLED) (UP) Pool member is available</FONT><br>
<FONT COLOR="#008000">   myvip.my.domain:993 -> myserver2.my.other.domain:993 [0] (ENABLED) (UP) Pool member is available</FONT><br>
<FONT COLOR="#008000">   myvip.my.domain:993 -> myserver3.my.other.domain:993 [0] (ENABLED) (UP) Pool member is available</FONT><br>
<br><FONT COLOR="#008000"> PORT 995 (myvip.my.domain-pops) (ENABLED) The virtual server is available</FONT><br>
<FONT COLOR="#008000"> Default Pool: myvip.my.domain-pops () (ENABLED) The pool is available</FONT><br>
<FONT COLOR="#008000">   myvip.my.domain:995 -> myserver1.my.other.domain:995 [0] (ENABLED) (UP) Pool member is available</FONT><br>
<FONT COLOR="#008000">   myvip.my.domain:995 -> myserver2.my.other.domain:995 [0] (ENABLED) (UP) Pool member is available</FONT><br>
<FONT COLOR="#008000">   myvip.my.domain:995 -> myserver3.my.other.domain:995 [0] (ENABLED) (UP) Pool member is available</FONT><br>
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: plugin output size limit
Another possible suggestion is to have the plugin write the bulk of the output to a file and then use the actions component to build a URL to a place it could be displayed. They you could keep the output short but still have a link from the status detail page to view the verbose output.
Re: plugin output size limit
That might be feasible.
Is there a way to embed a link in the detail output that would display the locally stored data and make it look like it was part of the output?
Is there a way to embed a link in the detail output that would display the locally stored data and make it look like it was part of the output?
Re: plugin output size limit
Yes, you can embed an html link in the plugin output. There's an option in the Admin->Manage System Config page that allows html to be translated for plugin output.