Page 1 of 1

Re: [Nagios-devel] Discrepancy between command definitions and

Posted: Mon Mar 09, 2009 11:50 am
by Guest
Thomas Guyot-Sionnest wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> The documentation for ACKNOWLEDGE_{SVC,HOST}_PROBLEM commands in Nagios
> 2.x and 3.x says to use 1 for sticky and 0 for non-sticky ack's; however
> the way it's currently implemented is using the following macros for
> non-sticky and sticky ack's respectively:
>
> include/common.h:#define ACKNOWLEDGEMENT_NORMAL 1
> include/common.h:#define ACKNOWLEDGEMENT_STICKY 2
>
> Looks like it's always been like that so I think the best would be to
> fix the documentation... At least for the current releases. OTOH this
> will leave broken any home-build script that send the command according
> to the documentation.
>

Are you sure it's not just a bitshift thing, like so:

foo->ack_type = 1 << ack_type_from_command;

That's how I'd have done it, and then let ack_type serve doubly as
"has_been_acked" sort of thing.

I haven't checked myself though, so I could be completely wrong (I'm
lazy today, as it's a fine spring day in sweden :-))

--
Andreas Ericsson [email protected]
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231

Considering the successes of the wars on alcohol, poverty, drugs and
terror, I think we should give some serious thought to declaring war
on peace.





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