[mrtg] Cfgmaker Templates!
Brander, Eric
Eric.Brander at ACS-INC.com
Fri Nov 8 21:45:12 MET 2002
Ok, offline I've been educated on the -if-template and -host-template
options of cfgmaker. However, something I can't seem to find in the
documentation is giving me a problem. The top section of the template works
fine, with the [$target_name] tags. But the other two section, with
[$target_name_errors] and [$target_name_discards] don't work because its
interpreted as one non-existant variable. How do I get the text "_errors"
and "_discards" to fit inside the [] without being part of the variable?
Here's my template:
if(not $problem_lines)
{
$target_lines .= <<ECHO;
Target[$target_name]: $if_ref:$router_connect
Options[$target_name]: growright, nolegend, nobanner
WithPeak[$target_name]: wmy
MaxBytes[$target_name]: $if_speed
Title[$target_name]: $sysname -- $if_description
PageTop[$target_name]: <H1>$if_description</H1>
<TABLE>
<TR><TD>System:</TD> <TD>$sysname</TD></TR>
<TR><TD>Description:</TD><TD>$html_if_description</TD></TR>
<TR><TD>ifType:</TD> <TD>$html_if_type_desc ($if_type_num)</TD></TR>
<TR><TD>ifName:</TD> <TD>$html_if_snmp_name</TD></TR>
<TR><TD>Port Name:</TD> <TD>$if_port_name</TD></TR>
</TABLE>
Target[$target_name_errors]:
ifInErrors.$if_ref&ifOutErrors.$if_ref:$router_connect
Options[$target_name_errors]: growright, nolegend, nobanner, nopercent,
perminute
WithPeak[$target_name_errors]: wmy
MaxBytes[$target_name_errors]: 10000
AbsMax[$target_name_errors]: 10000000
LegendO[$target_name_errors]: Err/Min Out: 
LegendI[$target_name_errors]: Err/Min In : 
YLegend[$target_name_errors]: Errors
ShortLegend[$target_name_errors]:  
PageTop[$target_name_discards]: <H1>$if_description</H1>
<TABLE>
<TR><TD>System:</TD> <TD>$sysname</TD></TR>
<TR><TD>Description:</TD><TD>$html_if_description</TD></TR>
<TR><TD>ifType:</TD> <TD>$html_if_type_desc ($if_type_num)</TD></TR>
<TR><TD>ifName:</TD> <TD>$html_if_snmp_name</TD></TR>
<TR><TD>Port Name:</TD> <TD>$if_port_name</TD></TR>
</TABLE>
Target[$target_name_discards]:
ifInDiscards.$if_ref&ifOutDiscards.$if_ref:$router_connect
Options[$target_name_discards]: growright, nolegend, nobanner, nopercent,
perminute
WithPeak[$target_name_discards]: wmy
MaxBytes[$target_name_discards]: 10000
AbsMax[$target_name_discards]: 10000000
LegendO[$target_name_discards]: Dis/Min Out: 
LegendI[$target_name_discards]: Dis/Min In : 
YLegend[$target_name_discards]: Discards
ShortLegend[$target_name_discards]:  
PageTop[$target_name_discards]: <H1>$if_description</H1>
<TABLE>
<TR><TD>System:</TD> <TD>$sysname</TD></TR>
<TR><TD>Description:</TD><TD>$html_if_description</TD></TR>
<TR><TD>ifType:</TD> <TD>$html_if_type_desc ($if_type_num)</TD></TR>
<TR><TD>ifName:</TD> <TD>$html_if_snmp_name</TD></TR>
<TR><TD>Port Name:</TD> <TD>$if_port_name</TD></TR>
</TABLE>
ECHO
} else {
$head_lines="";
$problem_lines="";
$target_lines="";
$separator_lines="";
}
-----Original Message-----
From: Brander, Eric [mailto:Eric.Brander at ACS-INC.com]
Sent: Friday, November 08, 2002 1:09 PM
To: mrtg at list.ee.ethz.ch
Subject: [mrtg] Enhanced Configmaker?
Configmaker is a good start, but it would sure be nice if it also generated
a config file that also graphed errors and discards. Right now I'm
modifying my config for a Cisco 4006 that has 74 ports, meaning I have to
manually create the error and discard graph config entries. I'm about half
way through and my fingers are tired.
Probably too late for this project, but is there any enhanced / modified
configmaker that will build a config that include errors and discards?
Eric
--
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