NDO big perfdata bug?

Jose Luis Martinez jlmartinez-lists-nagios-devel at capside.com
Mon Sep 28 20:26:05 CEST 2009


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.

	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?

Cheers,

Jose Luis Martinez
jlmartinez at capside.com
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: test.dat
URL: <https://www.monitoring-lists.org/archive/developers/attachments/20090928/cc696a4e/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: check_big_perfdata.pl
URL: <https://www.monitoring-lists.org/archive/developers/attachments/20090928/cc696a4e/attachment.pl>
-------------- next part --------------
------------------------------------------------------------------------------
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
-------------- next part --------------
_______________________________________________
Nagios-devel mailing list
Nagios-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-devel


More information about the Developers mailing list