Re: [Nagios-devel] NEBCALLBACK_SERVICE_STATUS_DATA callback being

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] NEBCALLBACK_SERVICE_STATUS_DATA callback being

Post by Guest »

On Tue, Dec 2, 2008 at 11:50 PM, Andreas Ericsson wrote:
> James King wrote:
>> Hello all,
>>
>> I'm attempting to write a NEB module that will enable forwarding of
>> service state transitions to another NMS platform. I'm registering
>> for NEBCALLBACK_SERVICE_STATUS_DATA, but my callback is being invoked
>> twice for each status update, with identical timestamp, type code and
>> identical current_state and last_state in the (service *)
>> (data->object_ptr). There's only a single event type associated with
>> this hook (NEBTYPE_SERVICESTATUS_UPDATE). Is this normal behavior for
>> this hook (and if so, what is the reasoning behind this, or is there
>> at least a difference between the 2 invocations that I can use to
>> filter on)?
>
> Here's how Merlin does it. Note the first check there, making sure that
> if (ds->type != NEBTYPE_SERVICECHECK_PROCESSED), it returns immediately.

Thanks Andreas, I've changed to SERVICE_CHECK_DATA instead, and I can
properly filter my events now. I was just using SERVICE_STATUS_DATA
so that I would get the direct pointer to the service object, but
find_service() works just as well.

Nevertheless, the double invocation for SERVICE_STATUS_DATA still
seems a bit fishy to me.


Thanks,
James





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