ndoutils missing output column from nagios_hostchecks table after updating to 1.48
Hendrik Baecker
andurin at process-zero.de
Tue Oct 6 08:43:00 CEST 2009
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Am 05.10.09 17:56, schrieb Michael Friedrich:
> Hi,
>
> yep that's a bug since the code for query building is missing the
> long_output field.
>
> if(asprintf(&buf1,"instance_id='%lu', host_object_id='%lu',
> check_type='%d', is_raw_check='%d', current_check_attempt='%d',
> max_check_attempts='%d', state='%d', state_type='%d', start_time=%s,
> start_time_usec='%lu', end_time=%s, end_time_usec='%lu', timeout='%d',
> early_timeout='%d', execution_time='%lf', latency='%lf',
> return_code='%d', output='%s', perfdata='%s'"
> ,idi->dbinfo.instance_id
> ,object_id
> ,check_type
> ,is_raw_check
> ,current_check_attempt
> ,max_check_attempts
> ,state
> ,state_type
> ,ts[0]
> ,start_time.tv_usec
> ,ts[1]
> ,end_time.tv_usec
> ,timeout
> ,early_timeout
> ,execution_time
> ,latency
> ,return_code
> ,es[2]
> ,es[3]
> )==-1)
> buf1=NULL;
>
> Regarding the fact that es[3] points to long_output, but is assigned to
> perfdata
Nope ;)
Hunting some minor bugs in Nagios in the past I often smiled about some
copy & paste bugs by Ethan, now I did it by myself ;)
es[5] should be output
es[6] should be long_output (empty string of no long_outputs available)
...
,NDO_DATA_OUTPUT
,(es[5]==NULL)?"":es[5]
,NDO_DATA_OUTPUT
,(es[6]==NULL)?"":es[6]
...
*geeks*
Thanks Michael for the friendly slap into my face - Think I need it ;)
- -
Hendrik
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Darwin)
iEYEARECAAYFAkrK5vQACgkQlI0PwfxLQjk2jwCdEVchd/02hN8poKfRTCBZW+So
57gAn15OakRAGvDjoiQtBAr/QjZF2HST
=Wzz5
-----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