NDO big perfdata bug?

Hendrik Baecker andurin at process-zero.de
Wed Oct 7 12:21:16 CEST 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1



Am 29.09.09 11:24, schrieb Jose Luis Martinez:
>>
>> May be some buffer length restrictions in ndomod...
> 
> mmm... I'd look at the way the temp_buffer in ndomod.c is managed (fixed 
> 4KB length), and the escape routines. The perfdata seems to include data 
> about another result in it, and then ends with the 999. But my 
> read-code-debug-fu skills end here :D It's just a hunch.
>
I've just tracked it down.
The input_buffer[NDOMOD_MAX_BUFLEN] restriction (4k in include/ndomod.h)
is responsible for this problem.

Increasing it to 32k will run fine to handle your "2000 perfdata
overkill" test suite, but it is more a workaround than a solution.

Afaik Nagios should support 8k Plugin Output, already including the
performance data. As your test shows up, it ignores this limit.
Giving +/- 32k Output will be processed in all nagios stages, executing,
reaper, writing to status.dat, read out by the CGIs.

I would say: NDO should show same information as Nagios, but doing this
will bring us to dynamic mem allocs to handle an unknown amount of data
and also write an unknown amount of data to the database... worst case:
No good!

As a workaround I will increase the NDOMOD_MAX_BUFLEN to 16k, this
should be enough to handle the (ignored) 8k Limits of output + protocol
overhead in NDOUtils.
Also the db sheme change to TEXT instead of varchar(some-limits) to be
more independent.

@Community: Your opinions of these limits would be appreciated.

Workaround will be in CVS shortly.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Darwin)

iEYEARECAAYFAkrMa5wACgkQlI0PwfxLQjmZKACeJkOz1fpTrvuHa8CeAYzvA9KB
ZxwAn29sSTDfMARcFvEinwxU0IhWenFc
=i6TI
-----END PGP SIGNATURE-----

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference




More information about the Developers mailing list