Can you define an empty hostgroup?

Marc Powell marc at ena.com
Fri Aug 18 23:22:57 CEST 2006



> -----Original Message-----
> From: nagios-users-bounces at lists.sourceforge.net [mailto:nagios-users-
> bounces at lists.sourceforge.net] On Behalf Of Samuel P Howard
> Sent: Friday, August 18, 2006 12:07 PM
> To: nagios-users at lists.sourceforge.net
> Cc: Marc Powell
> Subject: Re: [Nagios-users] Can you define an empty hostgroup?
> 
> 
> > Each defined hostgroup must have at least one member, either within
the
> > hostgroup{} definition itself or in by way of the hostgroups field
in
> > the host{} definition. I encountered the same issue with our
automated
> > config generation and created an anchor host that was never checked
and
> > assigned to those hostgroups that would intermittently have real
hosts.
> > The proper solution is to track which hostgroups have active members
and
> > then create them as needed.
> >
> > --
> > Marc
> I had hoped that creating a host definition with the hostgroups line
> would autocreate the hostgroup, but it gives an error on the
> pre-flight.  Is this a bug then?

No, you must create the skeleton hostgroup as below. It's not a bug,
that's how it's designed. It can't auto-create it as the other required
hostgroup element, alias, would be unknown.

define host {
        use                     generic-host
        host_name               tnops-redacted
        alias                   Redacted - 4774
        address                 redacted
        contact_groups          tnops
        hostgroups              tnops-williamson,all-middle-tn
}

define hostgroup {
        hostgroup_name  tnops-williamson
        alias           Williamson Tennessee
}

define hostgroup {
        hostgroup_name  all-middle-tn
        alias           All Middle Tennessee
}

--
Marc

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list