NDO big perfdata bug?
Hendrik Baecker
andurin at process-zero.de
Mon Sep 28 22:51:35 CEST 2009
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Am 28.09.09 20:26, schrieb Jose Luis Martinez:
> Hi,
>
> Currently I'm testing injecting big results into Nagios via a new
> program called nrd (Nagios Result Distributor) (I posted a while ago on
> this list, announcing it as nsca2).
>
> Currently I'm getting the results into Nagios fine, but ndo seems to
> have a bad time with big perfdata... The Nagios screens show all the
> perfdata correctly, but the results don't appear in the NDO db.
>
Since you are using b7 - yes.
The DB scheme is/was a 255 wide varchar.
Did you try to increase it like this:
ALTER TABLE `nagios`.`nagios_hostchecks` MODIFY COLUMN `perfdata`
VARCHAR(8192) NULL;
ALTER TABLE `nagios`.`nagios_hoststatus` MODIFY COLUMN `perfdata`
VARCHAR(8192) NULL;
ALTER TABLE `nagios`.`nagios_servicechecks` MODIFY COLUMN `perfdata`
VARCHAR(8192) NULL;
ALTER TABLE `nagios`.`nagios_servicestatus` MODIFY COLUMN `perfdata`
VARCHAR(8192) NULL;
> I activate debugging in NDO, and never see an INSERT with lots of
> perfdata. I've tracked down the problem to the following:
>
> - the ndo.dat file seems to get the data messed up:
>
> - reading through the code, it looks like every entry in the ndo.dat
> would finish in 999 (NDO_API_ENDDATA)
>
> - the perfdata entry 99 (NDO_API_PERFDATA) for "206:" seems to have a
> mix of data in it (starts like result "213", until you get another
> NDO_API_PERFDATA section, and at the end of the line you get a 999 (with
> no "\n" before it).
>
> - I attach a test.dat file that is a capture of the ndo.dat file so
> you can examine it.
>
> - I attach the script that is causing this: check_big_perfdata.pl
>
> I would expect to see the 500 perfdata entries that the big_perfdata
> check generates (as the Nagios status screens show them without problems)
>
> Looking around in the code, to find a possible cause, I think I found a
> small bug in io.c, also
> ndo_unescape_buffer:
> if (buffer[x+1]=='\t'){
> i think should be
> if (buffer[x+1]=='t'){
> but I think this is unrelated to the big perfdata problem.
>
> Any thoughs on why NDO is "eating up" the perfdata?
May be some buffer length restrictions in ndomod...
You give everything a developer wants to have to track down this
problem. Nice work!
I marked your mail and will go deeper into it. Would you please open a
tracker for it (http://tracker.nagios.org), feel free to assign it
directly to me (hbaecker).
- -
Hendrik
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Darwin)
iEYEARECAAYFAkrBIdcACgkQlI0PwfxLQjmz0QCePBC/XVDxZNSN2dUrxNr6Bz1S
zagAnj6dDQnEcJZpeyFlUVDcBlX/n021
=Oj2j
-----END PGP SIGNATURE-----
------------------------------------------------------------------------------
Come build with us! The BlackBerry® 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/devconf
More information about the Developers
mailing list