[mrtg] Re: Templates

Tim Sheets TSheets at illinois.net
Mon Jun 7 14:45:37 MEST 2004


Yes, take a look at the cfgmaker manual for a list of valid vairables for use within templates.  I believe that is your problem.  There is a sample near the end of the doc.  I would (and did) start with that, and get that to work, then start tweaking to make it do what you want.

Tim


-----Original Message-----
From:	Jon Ha [mailto:Jon at xanga.net]
Sent:	Mon 6/7/2004 1:12 AM
To:	mrtg at list.ee.ethz.ch
Cc:	
Subject:	[mrtg] Re: Templates
Hi,

Everything with a $ infront of it are variables, you need to replace them with the correct values.

$CFGNAME is usually how you name the device and MRTG will generate files based on that.

$INSTANCE need to be replace with what you want to monitor.

$COMMUNITY is the name of the SNMP community, usually public.

$IP is the IP of the device.

Good luck.

---------- Original Message ----------------------------------
From: hdevito at qwest.net
Date:  Sun, 6 Jun 2004 21:15:14 -0500

>I keep receiving errors when I try to use these templates what am I doing
>wrong?
>
>Trying to use the following template.
>
>Target[$CFGNAME]:
>1.3.6.1.2.1.2.2.1.14.$INSTANCE&1.3.6.1.2.1.2.2.1.20.$INSTANCE:$COMMUNITY@$IP
>ADDRESS * 300
>MaxBytes[$CFGNAME]: $MAX
>YLegend[$CFGNAME]: errs/intrvl
>ShortLegend[$CFGNAME]: sec
>Legend1[$CFGNAME]: Errors per interval
>Legend2[$CFGNAME]: Errors per interval
>Legend3[$CFGNAME]: Errors Max value per interval on graph
>Legend4[$CFGNAME]: Errors value per interval on graph
>LegendI[$CFGNAME]:  Errors
>LegendO[$CFGNAME]:  Errors
>Title[$CFGNAME]: switch $PORT - Errors/second
>PageTop[$CFGNAME]: <H3>switch $PORT - Errors/second</H3>
>Options[$CFGNAME]: unknaszero
>Colours[$CFGNAME]: GREEN#00eb0c,BLUE#0000ff,GRAY#AAAAAA,VIOLET#ff00ff
>WithPeak[$CFGNAME]: ymw
>
>This is the command line I'm using
>
>cfgmaker --if-template=iferror.template --noreversedns community at 1.2.3.4 >
>/etc/mrtg/mainrouter.cfg
>
>
>This is the error that gets returned
>
>Global symbol "$CFGNAME" requires explicit package name at (eval 4) line 23,
><IF_TEMPLATE> line 31.
>
>Please help.  It seems the more I try to understand the worse I get.
>
>--
>Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
>Archive     http://www.ee.ethz.ch/~slist/mrtg
>FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
>WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi
>
>

--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive     http://www.ee.ethz.ch/~slist/mrtg
FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi





--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive     http://www.ee.ethz.ch/~slist/mrtg
FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the mrtg mailing list