MAX_PLUGIN_OUTPUT_LENGHT

pozda at tiscali.cz pozda at tiscali.cz
Fri Oct 19 16:02:38 CEST 2007


Description of my test:
1) I change MAX_PLUGIN_OUTPUT_LENGHT to 8192, recompile nagios
2) restart nagios
3) send very long string to external file 
/usr/bin/printf "[%lu] PROCESS_SERVICE_CHECK_RESULT;martin-xp;Backup;0;$string"
$now  > $commandfile

The nagios trimps my $string to 957 bytes. It seems, that nagios trimps string
to 1024 and 67 bytes is header.

I have only some minutes to go throuth sources and I found some buffer,s
that are defined directly for instance
common\snprintf line 1267
        char buf1[1024]; 
	char buf2[1024]; 

And there are many other constant defined to 1024 

cgi\extinfo  #define MAX_MESSAGE_BUFFER    1024
cgi\status.c MAX_MESSAGE_BUFFER 1024
include\comon.h #define MAX_INPUT_BUFFER 1024

When I blindly change some of then, I was able to send to nagios message
4033 bytes long.

Martin

Ethan Galstad napsal(a):
> pozda at tiscali.cz wrote:
>> Hello
>>
>> I'm testing nagios 3.0b5. During my tests I try to change maximum plugin
>> output as written in documentation.
>> It's not working, it seems that some buffers are not defined based
>> MAX_PLUGIN_OUTPUT_LENGHT constant.
>>
>> Martin
>>
>
> Martin - Where are you seeing problems with the buffer length being 
> clipped short of MAX_PLUGIN_OUTPUT_LENGTH?  If that's happening, its a

> bug and needs to be fixed.
>
>
> Ethan Galstad,
> Nagios Developer
> ---
> Email: nagios at nagios.org
> Website: http://www.nagios.org
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems?  Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> _______________________________________________
> Nagios-devel mailing list
> Nagios-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-devel

Martin

______________________________________
Superrychlý internet ADSL 512 od TISCALI již od 399 Kč měsíčně !

http://sluzby.tiscali.cz/domacnosti/adsl/adsl-512-promo.php?r=pb




-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/




More information about the Developers mailing list