Template shortcut problem?

Cook, Garry GWCOOK at mactec.com
Thu Mar 11 22:44:22 CET 2004


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'.

Garry W. Cook, CCNA
Network Infrastructure Manager
MACTEC, Inc. - http://www.mactec.com/
303.308.6228 (Office) - 720.220.1862 (Mobile)


-------------------------------------------------------
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