[mrtg] Newbie - setting up templates
Cristine Warring
cwarring at weci.net
Fri Apr 15 16:26:18 MEST 2005
Hello -
I have mrtg up and running on RedHat, both polling hosts and interfaces.
However, due to the number of devices I need to monitor and Somix's
repository, I want to use templates to make this easier to get started
and maintain long-term.
The newbie question is:
How/where do I set the Perl variables so I don't get Perl errors when I
run cfgmaker? I've searched the FAQ, the listserv archive, Google, and
cannot find any step by step examples.
Here's my cfgmaker call, my template, and the errors - much TIA -
Cristine
bin/cfgmaker \
--global 'WorkDir: /home/sites/mrtg' \
--global 'RunAsDaemon: Yes' \
--output /home/sites/mrtg/cfg/aaa.bbb.ccc.ddd.cfg \
--ifref=name \
--ifdesc=name \
--show-op-down \
--subdirs=HOSTNAME \
--if-template=/home/sites/mrtg/cfg/cisco.template \
public at aaa.bbb.ccc.ddd
ECHO
$target_lines .= <<ECHO
Target[$targetname]: #1/1:public at aaa.bbb.ccc.dddd"
MaxBytes[$targetname]: 1250000"
Options[$targetname]: bits, unknaszero
Title[$targetname]: 3550
PageTop[$targetname]: <H1>Cisco 3550</H1>
YLegend[$targetname]: Port Utilization
LegendI[$targetname]: In
LegendO[$targetname]: Out
Legend1[$targetname]: Inbound Bits
Legend2[$targetname]: Outbound Bits
Legend3[$targetname]: INBOUND Max value per interval on graph
Legend4[$targetname]: OUTBOUND Max value per interval on graph
Colours[$targetname]: GREEN#00eb0c,BLUE#0000ff,GRAY#AAAAAA,VIOLET#ff00ff
WithPeak[$targetname]: ymw
ECHO
----------------------------
<snip earlier cfgmaker output>
Evaluation of the contents in the file
/home/sites/mrtg/cfg/cisco.template
gave the error
"Global symbol "$targetname" requires explicit package name at (eval 4)
line 3, <IF_TEMPLATE> line 20.
Global symbol "$targetname" requires explicit package name at (eval 4)
line 3, <IF_TEMPLATE> line 20.
Global symbol "$targetname" requires explicit package name at (eval 4)
line 3, <IF_TEMPLATE> line 20.
Global symbol "$targetname" requires explicit package name at (eval 4)
line 3, <IF_TEMPLATE> line 20.
Global symbol "$targetname" requires explicit package name at (eval 4)
line 3, <IF_TEMPLATE> line 20.
Global symbol "$targetname" requires explicit package name at (eval 4)
line 3, <IF_TEMPLATE> line 20.
Global symbol "$targetname" requires explicit package name at (eval 4)
line 3, <IF_TEMPLATE> line 20.
Global symbol "$targetname" requires explicit package name at (eval 4)
line 3, <IF_TEMPLATE> line 20.
Global symbol "$targetname" requires explicit package name at (eval 4)
line 3, <IF_TEMPLATE> line 20.
Global symbol "$targetname" requires explicit package name at (eval 4)
line 3, <IF_TEMPLATE> line 20.
Global symbol "$targetname" requires explicit package name at (eval 4)
line 3, <IF_TEMPLATE> line 20.
Global symbol "$targetname" requires explicit package name at (eval 4)
line 3, <IF_TEMPLATE> line 20.
Global symbol "$targetname" requires explicit package name at (eval 4)
line 3, <IF_TEMPLATE> line 20.
Global symbol "$targetname" requires explicit package name at (eval 4)
line 3, <IF_TEMPLATE> line 20.
"
Cristine Warring
Internet Services
Wheatland Broadband Services
www.wbsnet.org
cwarring at weci.net <mailto:cwarring at weci.net>
--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive http://lists.ee.ethz.ch/mrtg
FAQ http://faq.mrtg.org Homepage http://www.mrtg.org
WebAdmin http://lists.ee.ethz.ch/lsg2.cgi
More information about the mrtg
mailing list