[mrtg] Re: Graphing interface errors

Eric Brander eric_mailing_list at rednarb.com
Mon Jun 26 21:44:23 MEST 2006


mchandler at solutions.canon.com wrote:
> I tried a template I found at:
> http://mrtg.gvolk.com/template/interface-errors.template
>
> But I got a whole slew of errors.
>
>   

Not sure about your template errors, but I built this interface template 
for my Cisco gear and it works just dandy. It includes some items for 
Routers2 which you are of course free to remove.

I call it with the 
--if-template=/btn/mrtg/bin/templates/template-if-TEMPLATENAME.txt 
parameter, --ifdesc=name, among many other command line options specific 
to my environment.

#######Start Template
if(not $problem_lines)
{

my $target_name = $sysname . "_" . $if_ref;

$target_lines .= <<ECHO;

Target[$target_name]: $if_ref:$router_connect
Options[$target_name]: growright, bits
WithPeak[$target_name]: wmy
MaxBytes[$target_name]: $if_speed
Legend1[$target_name]: Incoming Traffic in Bits per Second
Legend2[$target_name]: Outgoing Traffic in Bits per Second
Legend3[$target_name]: Peak 5 Minute Incoming Traffic
Legend4[$target_name]: Peak 5 Minute Outgoing Traffic
routers.cgi*Mode[$target_name]: interface
routers.cgi*Icon[$target_name]: switch2-sm.gif
Title[$target_name]: $if_snmp_name - Network Utilization
SetEnv[$target_name]: MRTG_INT_DESCR="$if_snmp_name - Util"
PageTop[$target_name]: <H1><font color="#0000FF">$if_snmp_name - Network 
Utilization</font></H1>

ECHO

#my $target_name = $router_name . "_" . $if_ref . "_errors";
my $target_name = $sysname . "_" . $if_ref . "_errors";

$target_lines .= <<ECHO;

Target[$target_name]: ifInErrors.$if_ref&ifOutErrors.$if_ref:$router_connect
Options[$target_name]: growright, nobanner, nopercent, perminute, noo
WithPeak[$target_name]: wmy
MaxBytes[$target_name]: 10000
AbsMax[$target_name]: 10000000
Colours[$target_name]: RED#cc0000,ORANGE#ff6600,DARK 
GREEN#006600,VIOLET#ff00ff
LegendO[$target_name]: Err/Min Out:
LegendI[$target_name]: Err/Min In:
YLegend[$target_name]: Errors/Minute
Legend1[$target_name]: Incoming Errors per Minute
Legend2[$target_name]: Outgoing Errors per Minute
Legend3[$target_name]: Peak 5 Minute Incoming Errors per Minute
Legend4[$target_name]: Peak 5 Minute Outgoing Errors per Minute
routers.cgi*Icon[$target_name]: error-sm.gif
routers.cgi*InOut[$target_name]: no
routers.cgi*InCompact[$target_name]: no
routers.cgi*Mode[$target_name]: generic
ShortLegend[$target_name]: &nbsp;
Title[$target_name]: $if_snmp_name - Errors
SetEnv[$target_name]: MRTG_INT_DESCR="$if_snmp_name - Errors"
PageTop[$target_name]:  <H1><font color="#0000FF">$if_snmp_name - 
Errors</font></H1>

ECHO


} else {
  $head_lines="";
  $problem_lines="";
  $target_lines="";
  $separator_lines="";
}

#######End Template

HTH,

Eric Brander

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