Template shortcut problem?

Cook, Garry GWCOOK at mactec.com
Thu Mar 11 23:13:50 CET 2004


Marc Powell wrote:
> 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.

I apologize. I fired off that email and didn't even realize what I had
typed. I thought that this was your service definition, not host
definition.
I was attempting to explain how to simplify your service defs by using
hostgroups instead of listing all of the host names. It doesn't look
like that was what you were asking for.
It's been a long day...

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