Re: [Nagios-devel] NEB and config objects

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] NEB and config objects

Post by Guest »

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 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 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.c ... promo.tmpl
> > > _______________________________________________
> > > Nagios-devel mailing list
> > > [email protected]
> > >
> > https://lists.sourceforge.net/lists/lis ... gios-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.c ... promo.tmpl
> _______________________________________________
> Nagios-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/lis ... gios-devel
>





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





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