Nagios NEB Nagios-DB Install Guide

Danny Russell drussell at mpifix.com
Sun Apr 30 20:37:37 CEST 2006


Awesome, it compiled!

 

Thanks for your help.

 

________________________________

From: Adrian Hungate [mailto:adrian at haqa.co.uk] 
Sent: Sunday, April 30, 2006 7:39 AM
To: Danny Russell
Subject: RE: [Nagios-users] Nagios NEB Nagios-DB Install Guide

 

Hi there Danny!

I saw your message to the nagios-users list about the
neb_register_callback problem compiling inserter.c for nagios-db. I am
also having the same problem. It would appear that nagios-db was written
for an earlier version of the nagios API, and the neb_register_callback
now takes an additional parameter.

The new signature is 

 
int neb_register_callback(int callback_type, void *mod_handle, int
priority, int (*callback_func)(int,void *));

which obviously differs from the earlier version. My guess is that the
void *mod_handle is the new part and I am looking to work out what that
should contain. My guess is that this is the nebmodule parameter to the
nebmodule_init function.

I added the following line to the global defines for the file: 

 
nebmodule *nebhandle;

Then I've added 

 
nebhandle = handle;

as the first executable line in nebmodule_init, then each call needs
nebhandle inserting as its second parameter, i.e. 

 
neb_register_callback(NEBCALLBACK_TIMED_EVENT_DATA, nebhandle, 0,
loadconfig);

etc...

Hope this helps...

Adrian...

P.S.: I just found this
http://www.barbich.net/websvn/wsvn/nagios?op=comp&compare%5B%5D=%2Fnagio
s%2Fpatches at 1&compare%5B%5D=%2Fnagios%2Fpatches at 54 which may help you.
It appears to make the same change I made, but also changes the name of
one of the callback events. YMMV

-- 
Adrian Hungate <adrian at haqa.co.uk> 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20060430/f329e778/attachment.html>


More information about the Users mailing list