Building Hostgroups using Host Config Files

Adams, Russell L. RLAdams at Kelsey-Seybold.com
Fri Dec 23 21:58:37 CET 2005


There's a helper script in NACE to generate hostgroups from
configuration files where you use a "hostgroup" field with a comment
before it, ie:

myts.cfg:

define host {
        address x.x.x.x
        alias   myts
#       host_group      TerminalServers
        host_name       myts
        use     TerminalServerTemplate
}

Russell

On Fri, Dec 23, 2005 at 02:44:09PM -0600, Zac wrote:
> Thanks for the response, but I am trying to avoid the confusion of
> having some hosts set in a hostgroup definition and others by just using
> the hostgroup line in the host definition.  If I setup some hosts on the
> members line in a  hostgroup definition and then some with the hostgroup
> line in the host definition, it populates properly, but I think that
> will be messy and confusing in the long run.  I will cc the devel list
> and see if anyone can tell me if I can avoid having hostgroup
> definitions.
> 
> -Zac
> 
> 
> On 12/23/05, Hugo van der Kooij < hvdkooij at vanderkooij.org
> <mailto:hvdkooij at vanderkooij.org> > wrote:
> 
> On Fri, 23 Dec 2005, Zac wrote:
> 
> > Am I allow to do this?  According to the documentation I can use just
> the
> > hostgroups line in the host definition as an alternative to a
> hostgroups
> > definition.  As a fix I tried making a hostgroup definition, but
> without the 
> > members line, since all my members will be defined in the host
> definition,
> > this just changed the error to
> >
> > Error: Hostgroup has no members (config file
> > '/opt/nagios/etc/corenap/corenap_hostgroups.cfg', starting on line 1) 
> 
> The members line is still defined as required according to:
> http://nagios.sourceforge.net/docs/2_0/xodtemplate.html
> <http://nagios.sourceforge.net/docs/2_0/xodtemplate.html> 
> 
> Have you tried to have a host only added to the hostgroup line and see
> if 
> other hosts are detected as part of this hostgroups due to their
> hostgroup
> line in their host template?
> 
> Besides that it is a user mailinglist and I guess the real developers
> are
> on other lists.
> 
> Hugo. 
> 
> --
>         I hate duplicates. Just reply to the relevant mailinglist.
>          hvdkooij at vanderkooij.org <mailto:hvdkooij at vanderkooij.org>
> http://hvdkooij.xs4all.nl/ <http://hvdkooij.xs4all.nl/>  
>                 Don't meddle in the affairs of magicians,
>                 for they are subtle and quick to anger.
> 
> 
> -------------------------------------------------------
> 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_id=7637
> <http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click>
> &alloc_id=16865&op=click
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> <mailto:Nagios-users at lists.sourceforge.net> 
>  <https://lists.sourceforge.net/lists/listinfo/nagios-users>
> 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 
> 
> 
> 


-------------------------------------------------------
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_id=7637&alloc_id=16865&op=click
_______________________________________________
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