Re: [Nagios-devel] ndoutils missing output column

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] ndoutils missing output column

Post by Guest »

-----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-----





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