Re: [Nagios-devel] MAX_PLUGIN_OUTPUT_LENGHT

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
Guest

Re: [Nagios-devel] MAX_PLUGIN_OUTPUT_LENGHT

Post by Guest »

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;$s=
tring"
$now > $commandfile

The nagios trimps my $string to 957 bytes. It seems, that nagios trimps s=
tring
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):
> [email protected] wrote:
>> Hello
>>
>> I'm testing nagios 3.0b5. During my tests I try to change maximum plug=
in
>> 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: [email protected]
> 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
> [email protected]
> https://lists.sourceforge.net/lists/lis ... gios-devel

Martin

______________________________________
Superrychl=FD internet ADSL 512 od TISCALI ji=BE od 399 K=E8 m=ECs=ED=E8n=
=EC !

http://sluzby.tiscali.cz/domacnosti/ads ... php?r=3Dpb








This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
Locked