Template shortcut problem?

Marc Powell marc at ena.com
Thu Mar 11 23:05:51 CET 2004


On Thursday, March 11, 2004 3:44 PM, Cook, Garry shared with us:

> nagios-users-admin at lists.sourceforge.net wrote:
> > Hi all! I'm starting to play around with 2.0a and I have it working
> > so now I'm looking at doing some things with template-magic that I
> > probably should have done a long time ago. Unfortunately I'm doing
> > something wrong and could use another pair of eyes. I basically have
> > about 1600 hosts that I'm looking at for this that are split up into
> > 138 hostgroups with most hosts being in two different hostgroups.
> > I'm trying to use template magic to eliminate having to specify
> > each as an argument to the hostgroup 'members' directive by using
> > the 'hostgroups' directive in the
> > host definition and to simplify my configs like so --
> > 
> > # Host definition
> > define host {
> >         use                     generic-host
> >         host_name               <HOSTNAME REMOVED>
> >         alias                   Alcoa Elementary/LEA
> >         address                 <IP ADDRESS REMOVED>
> >         hostgroups              all-east-tn,tnops-alcoa-tn         }
> > 
> [snip]
> > Thanks!
> 
> In the host definition, try removing the 'host_name' line and
> changing the hostgroups line to 'hostgroup_name'. 

How then would I associate a service with a particular host? From my
experience, host_name is the single most important key that's used by
everything and can not be removed.

--
Marc


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id70&alloc_id638&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