[mrtg] Upgrading MRTG and the use of host-templates

"Sæthre, Knut Aksel" knutas at ftd.mil.no
Tue Sep 25 14:12:46 MEST 2001


Hi,

for about three years now we had a NT-box collecting statistics from our 
router based network (interfaces, cpu and memory utilization etc)
all together about 800 stats. This has been running almost flawless,
but the box (old Pentium) is heavily loaded.

Because of a major upgrade in our Cisco-based network, a lot of new
interfaces
will be installed, causing havoc with our index-based data.

So time to upgrade, from the version 2.5.4 to 2.9.17.

I'v downloaded & installed 2.9.17 on a Win2000 box, no problems getting it
up and 
running...but....a couple of questinons:

1. Is there an automated way of keeping our old data? We want to go from an
 SNMP-indexed to a IP-based numbering scheme (interface reference).

2. The first time we had this thing running, I changed "cfgmaker" to include
cpu/mem etc
and to custumice the data. I see that "cfgmaker" has grown quite a bit, and
now has
a lot of features that makes it easier to custumice. 

So, one spesific question: I'm not familier with Perl programming and I
tried to use
the host-template option. When I try to run cfgmaker with this option 

perl cfgmaker  --host-template=cputemplate ...<load of other options>

I get the following error messages:  

****************** Error message start **********************
Evaluation of the contents in the file

cputemplate
gave the error

"Can't find string terminator "
ECHO" anywhere before EOF at (eval 6) line 1, <IF_TEMPLATE> line 29.
"

Exiting cfgmaker
****************** Error messag stop ***********************

Now, the file "cputemplate" looks like this, copied directly from the docs:

**************** cputemplate ***************************************
 $head_lines .= <<ECHO;
 #---------------------------------------------------------------------
 ECHO
 my $target_name = $router_name . ".cpu";
 $target_lines .= <<ECHO;

 YLegend[$target_name]: Percentage CPU load
 ShortLegend[$target_name]: %
 Legend1[$target_name]: CPU load in %
 Legend2[$target_name]: 
 Legend3[$target_name]: Max Observed CPU load
 Legend4[$target_name]: 
 LegendI[$target_name]: &nbsp;CPU Load:
 LegendO[$target_name]: 
 WithPeak[$target_name]: ywm
 MaxBytes[$target_name]: 100
 Options[$target_name]: growright, gauge, nopercent
 Title[$target_name]: $router_name CPU load
 Target[$target_name]:
1.3.6.1.4.1.9.2.1.58.0&1.3.6.1.4.1.9.2.1.58.0:$router_connect
 PageTop[$target_name]: <H1>$router_name CPU load</H1>
   <TABLE>
     <TR><TD>System:</TD><TD>$router_name in $html_syslocation</TD></TR>
     <TR><TD>Maintainer:</TD><TD>$html_syscontact</TD></TR>
     <TR><TD VALIGN="top">Description:</TD><TD>$html_sysdescr</TD></TR>
     <TR><TD>Resource:</TD><TD>CPU.</TD></TR>
   </TABLE>
 ECHO
*********************** End of cputemplate ********************************

Hopefully this is easy to spot for a well trained Perl'er, but...I fumbled
around sometime trying
different things, looking in the docs etc, but with no luck. I hope anyone
out there can point me in the 
right direction.

Regards,

Knut Saethre

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