[Nagios-users] Dual call to NEB callback functions. (help)

Ethan Galstad nagios at nagios.org
Tue Mar 8 13:29:38 CET 2005


This isn't a bug, but it is confusing, especially since I haven't 
started on the NEB documentation yet.  For active checks, you should 
be getting two callbacks for each check.  For passive checks, you get 
only one.

The key is to check the .type member of the data structure that is 
passed to the callback function.

If type==NEBTYPE_SERVICECHECK_INITIATE, the service check has just 
been initated (only for active checks).  This event is usually only 
useful if you want to track when a service checks gets executed.

If type==NEBTYPE_SERVICECHECK_PROCESSED, the data contains the 
processed results of the service check.  This is probably what you're 
interested in. 

Hope that helps.


On 8 Mar 2005 at 11:55, Haze wrote:

> Hi list,
> 
> I have been experimenting with writing an RRD based NEB module for our
> Nagios2 clusters. Everything seemed to be going fine until I noticed a
> number of extra calls to the NEB callback functions. In an effort to
> track down the problem I have striped my Nagios config files and the
> NEB module down to their bare minimum. (See attached if you are
> interested).
> 
> The problem seems to be that even though I only register the function
> once with 'neb_register_callback' it gets run twice for each service
> in an 'interval_length'. I have tried this with both the cvs snapshot
> and the 2.0b2 tar balls.
> 
> If someone enlightened in the ways of NEB modules has 5mins spare and
> could have a look at the code/config and tell me if I am at fault,
> more than likely, or if I have stumbled upon a bug.
> 
> Thanks
> 
> Haze
> 
> 



Ethan Galstad,
Nagios Developer
---
Email: nagios at nagios.org
Website: http://www.nagios.org



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click




More information about the Developers mailing list