Re: [Nagios-devel] Problem extending the "Status Information" size.

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] Problem extending the "Status Information" size.

Post by Guest »

[email protected] wrote:
> Hi,
>
> I need to enter informations in "passive check" services via the FIFO
> (command file).
>
> The problem is : The size of the buffer used to store Status Informations is
> too small (332 bytes). The datas are truncated.
>
> I found the #define value ( include/objects.h : MAX_PLUGINOUTPUT_LENGTH )
> and extend it to 10240 but the datas are still truncated ( around 1024 bytes
> ).
>
> I found another #define for the size of a buffer used to store the complete
> input string ( include/common.h : MAX_INPUT_BUFFER ) which is set to 1024.
> But extending its value does not seem enough : Now, I can not update the
> passive check services.
>
> So, does someone know how to increase the "Status Information" size ? Which
> define do I need to change ? Which part of the code do I need to change ?
>
> Thanks.
>
> --
> Nicolas COLIN.
>

The problem you'll run into is due to a limitation with FIFOs in
general. The POSIX standard only guarantees an atomic write of 512
bytes max to a FIFO, so writing more data than 512 bytes at a time could
land you in trouble. AFAIK, most OSes bump this level up a bit, but the
max buffer size on a FIFO is often limited to 4K, so your total write
size can't really be above that level.

Length limitations for plugin output will disappear with Nagios 3.x.
There is a new IPC method for handling active host/service checks that
allows for long plugin output (its capped at 4K for safety's sake) and
there is a new external command that will allow passive checks to have
longer (and multiline) output as well. The new PROCESS_EXTERNAL_FILE
command will tell Nagios to read other external commands/passive checks
results from an external (flat) file. Regular files don't have line
length limitations, so this will be a useable workaround.

So, your the problem you have will disappear once Nagios 3 is released,
but it will still be a problem for Nagios 1/2. :-( Hope that helps.


Ethan Galstad,
Nagios Developer
---
Email: [email protected]
Website: http://www.nagios.org





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