Parsing host_list within neb module

Macha, Frank frank.macha at atosorigin.com
Thu Jan 5 22:23:40 CET 2006


Greetings...

I'm writing a module which intends to parse the host_list variable and
display the configured hosts to a log file (this is a simplified
snippet):

...
.
host *hl;

for (hl=host_list; hl != NULL; hl=hl->next)
 {
   sprintf(log,"log: host %s registered",hl->name);
   write_to_logs_and_console(log,NSLOG_INFO_MESSAGE,TRUE);

}
.
.

Am able to register the callback for the function which contains the
above code with no problem.

In my configs, I have defined 2 hosts, and both are recognized and
monitored actively (as verified via the gui). But, the above code in my
module only displays 1 host.   The same is true for the service_list, in
which I have 5 services defined in the config files, but a similar piece
of code only results in 1 service being printed to the log.....  I've
looked at other places w/in the base code with references to host_list,
and all seem to use the above convention when referring to the host_list
or service_list....

Thoughts? Anybody out there have dealt with this? Is there another way
to get a list of all the hosts/services (via the event broker)?

Thanks,

Eloy F. 'Frank'  Macha
ERP Technology Services
AtosOrigin, Inc
Office:   +1 817 264 8465
Cell:      +1 972 814 4979
Fax:      +1 817 264 8209
email: frank.macha at atosorigin.com
www.atosorigin.com



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&op=click




More information about the Developers mailing list