NEB and config objects

Titus Anderson titus_anderson at yahoo.com
Fri Oct 15 02:49:09 CEST 2004


Why can't you just iterate through the elements of the hostgroup_list variable?
 Something like:

hostgroup *hg;
for (hg = hostgroup_list; hg != NULL; hg = hg->next) {
  // Do something with hg
}

I don't know how to use the hashing, but if you need to search for a specific
hostgroup, you can use the find_hostgroup function.

--Titus

--- Ben <bench at silentmedia.com> wrote:

> Actually, while there seems to be ways to enumerate most objects, 
> enumerating hostgroups does not seem to be among them. Surely I'm missing 
> something, because that seems pretty dang useful - in fact, it's really 
> the main thing I'm interested in, so I can report based on hostgroup.
> 
> On Fri, 8 Oct 2004, Titus Anderson wrote:
> 
> > You should be able to use the functions declared in
> > common/objects.h, like "timeperiod *
> > find_timeperiod(char *,timeperiod *);" from within
> > your NEB module.  Or you could just walk the lists
> > themselves which are declared at the top of
> > common/objects.c.
> > 
> > --Titus
> > 
> > --- Ben <bench at silentmedia.com> wrote:
> > 
> > > Am I missing something, or is NEB missing a way to
> > > pass on config objects? 
> > > I'd like to use NEB to throw nagios events into a
> > > database, but I don't 
> > > want to have to duplicate my hostgroup configs and
> > > such in more than one 
> > > place.
> > > 
> > > 
> > > 
> > >
> > -------------------------------------------------------
> > > This SF.net email is sponsored by: IT Product Guide
> > > on ITManagersJournal
> > > Use IT products in your business? Tell us what you
> > > think of them. Give us
> > > Your Opinions, Get Free ThinkGeek Gift Certificates!
> > > Click to find out more
> > >
> > http://productguide.itmanagersjournal.com/guidepromo.tmpl
> > > _______________________________________________
> > > Nagios-devel mailing list
> > > Nagios-devel at lists.sourceforge.net
> > >
> > https://lists.sourceforge.net/lists/listinfo/nagios-devel
> > > 
> > 
> > 
> > 
> > 		
> > _______________________________
> > Do you Yahoo!?
> > Declare Yourself - Register online to vote today!
> > http://vote.yahoo.com
> > 
> 
> 
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
> Use IT products in your business? Tell us what you think of them. Give us
> Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
> http://productguide.itmanagersjournal.com/guidepromo.tmpl
> _______________________________________________
> Nagios-devel mailing list
> Nagios-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-devel
> 




		
__________________________________
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail 


-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl




More information about the Developers mailing list