[mrtg] Re: Monitoring In & Out Errors
Brander, Eric
Eric.Brander at ACS-INC.com
Thu Nov 21 14:13:52 MET 2002
Here is an example of one of my config files that gathers the normal
traffic, and also graphs errors and discards:
###################################################################
Target[2-TX4-2950_50]: 50:public at a.b.c.d:
Options[2-TX4-2950_50]: growright, bits, nolegend, nobanner
UnScaled[2-TX4-2950_50]: dwmy
WithPeak[2-TX4-2950_50]: wmy
MaxBytes[2-TX4-2950_50]: 125000000
Title[2-TX4-2950_50]: 2-TX4-2950 -- GigabitEthernet0/2
PageTop[2-TX4-2950_50]: <H1>GigabitEthernet0/2 </H1>
<TABLE>
<TR><TD>System:</TD> <TD>2-TX4-2950</TD></TR>
<TR><TD>Description:</TD><TD>GigabitEthernet0/2 </TD></TR>
<TR><TD>ifType:</TD> <TD>ethernetCsmacd (6)</TD></TR>
<TR><TD>ifName:</TD> <TD>Gi0/2</TD></TR>
<TR><TD>Port Name:</TD> <TD></TD></TR>
</TABLE>
Target[2-TX4-2950_50_errors]: ifInErrors.50&ifOutErrors.50:public at a.b.c.d:
Options[2-TX4-2950_50_errors]: growright, nolegend, nobanner, nopercent,
perminute
WithPeak[2-TX4-2950_50_errors]: wmy
MaxBytes[2-TX4-2950_50_errors]: 10000
AbsMax[2-TX4-2950_50_errors]: 10000000
Colours[2-TX4-2950_50_errors]: RED#cc0000,ORANGE#ff6600,DARK
GREEN#006600,DRKVIOLET#aa00aa
LegendO[2-TX4-2950_50_errors]: Err/Min Out: 
LegendI[2-TX4-2950_50_errors]: Err/Min In: 
YLegend[2-TX4-2950_50_errors]: Errors
ShortLegend[2-TX4-2950_50_errors]:  
Title[2-TX4-2950_50_errors]: 2-TX4-2950 -- GigabitEthernet0/2 -- Errors
PageTop[2-TX4-2950_50_errors]: <H1>GigabitEthernet0/2 </H1>
<TABLE>
<TR><TD>System:</TD> <TD>2-TX4-2950</TD></TR>
<TR><TD>Description:</TD><TD>GigabitEthernet0/2 </TD></TR>
<TR><TD>ifType:</TD> <TD>ethernetCsmacd (6)</TD></TR>
<TR><TD>ifName:</TD> <TD>Gi0/2</TD></TR>
<TR><TD>Port Name:</TD> <TD></TD></TR>
</TABLE>
Target[2-TX4-2950_50_discards]:
ifInDiscards.50&ifOutDiscards.50:public at a.b.c.d:
Options[2-TX4-2950_50_discards]: growright, nolegend, nobanner, nopercent,
perminute
WithPeak[2-TX4-2950_50_discards]: wmy
MaxBytes[2-TX4-2950_50_discards]: 10000
AbsMax[2-TX4-2950_50_discards]: 10000000
Colours[2-TX4-2950_50_discards]: ORANGE#ff6600,BRIGHTBLUE#0066ff,DARK
GREEN#006600,VIOLET#ff00ff
LegendO[2-TX4-2950_50_discards]: Dis/Min Out: 
LegendI[2-TX4-2950_50_discards]: Dis/Min In: 
YLegend[2-TX4-2950_50_discards]: Discards
ShortLegend[2-TX4-2950_50_discards]:  
Title[2-TX4-2950_50_discards]: 2-TX4-2950 -- GigabitEthernet0/2 -- Discards
PageTop[2-TX4-2950_50_discards]: <H1>GigabitEthernet0/2 </H1>
<TABLE>
<TR><TD>System:</TD> <TD>2-TX4-2950</TD></TR>
<TR><TD>Description:</TD><TD>GigabitEthernet0/2 </TD></TR>
<TR><TD>ifType:</TD> <TD>ethernetCsmacd (6)</TD></TR>
<TR><TD>ifName:</TD> <TD>Gi0/2</TD></TR>
<TR><TD>Port Name:</TD> <TD></TD></TR>
</TABLE>
###################################################################
I built the entire config file using Cfgmaker and a template. Here is my
template file:
####Start Template####
if(not $problem_lines)
{
#my $target_name = $router_name . "_" . $if_ref;
my $target_name = $sysname . "_" . $if_ref;
$target_lines .= <<ECHO;
Target[$target_name]: $if_ref:$router_connect
ECHO
if ($directory_name) {
$target_lines .= "Directory[$target_name]: $directory_name\n";
}
$target_lines .= <<ECHO;
Options[$target_name]: growright, bits, nobanner
UnScaled[$target_name]: dwmy
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
Title[$target_name]: $sysname -- $if_description -- Network Utilization
PageTop[$target_name]: <H1><font color="#0000FF">$if_description</font></H1>
<TABLE>
<TR><TD><font color="#800000"><b>System:</b></font></TD><TD><font
color="#800000"><b>$sysname</b></font></TD></TR>
<TR><TD>Description:</TD><TD>$html_if_description</TD></TR>
<TR><TD>Interface Name:</TD><TD>$html_if_snmp_name</TD></TR>
<TR><TD>Interface Type:</TD><TD>$html_if_type_desc
($if_type_num)</TD></TR>
<TR><TD>Interface Speed:</TD><TD><font
color="#0000FF">$if_speed_str</font></TD></TR>
</TABLE>
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
ECHO
if ($directory_name) {
$target_lines .= "Directory[$target_name]: $directory_name\n";
}
$target_lines .= <<ECHO;
Options[$target_name]: growright, nobanner, nopercent, perminute
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
Legend1[$target_name]: Incoming Errors per Second
Legend2[$target_name]: Outgoing Errors per Second
Legend3[$target_name]: Peak 5 Minute Incoming Errors per Second
Legend4[$target_name]: Peak 5 Minute Outgoing Errors per Second
ShortLegend[$target_name]:  
Title[$target_name]: $sysname -- $if_description -- Errors
PageTop[$target_name]: <H1><font
color="#0000FF">$if_description</font></H1>
<TABLE>
<TR><TD><font color="#800000"><b>System:</b></font></TD><TD><font
color="#800000"><b>$sysname</b></font></TD></TR>
<TR><TD>Description:</TD><TD>$html_if_description</TD></TR>
<TR><TD>Interface Name:</TD><TD>$html_if_snmp_name</TD></TR>
<TR><TD>Interface Type:</TD><TD>$html_if_type_desc
($if_type_num)</TD></TR>
<TR><TD>Interface Speed:</TD><TD><font
color="#0000FF">$if_speed_str</font></TD></TR>
</TABLE>
ECHO
#my $target_name = $router_name . "_" . $if_ref . "_discards";
my $target_name = $sysname . "_" . $if_ref . "_discards";
$target_lines .= <<ECHO;
Target[$target_name]:
ifInDiscards.$if_ref&ifOutDiscards.$if_ref:$router_connect
ECHO
if ($directory_name) {
$target_lines .= "Directory[$target_name]: $directory_name\n";
}
$target_lines .= <<ECHO;
Options[$target_name]: growright, nobanner, nopercent, perminute
WithPeak[$target_name]: wmy
MaxBytes[$target_name]: 10000
AbsMax[$target_name]: 10000000
Colours[$target_name]: ORANGE#ff6600,BRIGHTBLUE#0066ff,DARK
GREEN#006600,VIOLET#ff00ff
LegendO[$target_name]: Dis/Min Out: 
LegendI[$target_name]: Dis/Min In: 
YLegend[$target_name]: Discards
Legend1[$target_name]: Incoming Discards per Second
Legend2[$target_name]: Outgoing Discards per Second
Legend3[$target_name]: Peak 5 Minute Incoming Discards per Second
Legend4[$target_name]: Peak 5 Minute Outgoing Discards per Second
ShortLegend[$target_name]:  
Title[$target_name]: $sysname -- $if_description -- Discards
PageTop[$target_name]: <H1><font
color="#0000FF">$if_description</font></H1>
<TABLE>
<TR><TD><font color="#800000"><b>System:</b></font></TD><TD><font
color="#800000"><b>$sysname</b></font></TD></TR>
<TR><TD>Description:</TD><TD>$html_if_description</TD></TR>
<TR><TD>Interface Name:</TD><TD>$html_if_snmp_name</TD></TR>
<TR><TD>Interface Type:</TD><TD>$html_if_type_desc
($if_type_num)</TD></TR>
<TR><TD>Interface Speed:</TD><TD><font
color="#0000FF">$if_speed_str</font></TD></TR>
</TABLE
ECHO
} else {
$head_lines="";
$problem_lines="";
$target_lines="";
$separator_lines="";
}
####End Template####
And my command-line for cfgmaker is:
cfgmaker --if-template=template-switch.txt --ifdesc=name --descint
--show-op-down public at a.b.c.d --output=2-TX4-2950.tmp
It really helps if your Description field on your ports is filled out, but
its not needed. Also keep in mind that I've set the fist graph to Unscaled
(for my own controversial reasons, not needed to be discussed here) but you
may not want that. Put a # in front of that line or take it out entirely if
you wish to have your graphs scaled.
With that template, my cfg-maker config file is nearly perfect at creation.
I have a batch file that runs this cfgmaker and also prepends a "default"
set of global settings. The only manual change I make is in the description
- it seems to append a couple extra trailing spaces, so I do a search for "
--" and replace witn " --" and its all good.
Hope this helps!
Eric
-----Original Message-----
From: Michael Kopach [mailto:kopam at augustana.ab.ca]
Sent: Wednesday, November 20, 2002 4:27 PM
To: mrtg at list.ee.ethz.ch
Subject: [mrtg] Monitoring In & Out Errors
Hello All!
This is a newbie question and yes I did look in the manual. I am trying
to monitor interface errors, both in and out. The ifRef is set to name
i.e. --ifRef=name. The device is a HP 5308xl router with some gigabit
ports on it. I tried the line of
Target[IP_name]: ifInErrors#A1&ifOutErrors#A1:community-name
and mrtg did not seem to complain about it. However, there was no
output from it. What I need is an example from somewhere or someone as
to how to monitor port errors. Maybe another question would be, does
this need to be under a separate cfg file for mrtg to run? I am using
mftg 2.9.22 at the moment.
Thanks to one and all ... Mike
Michael A. Kopach
System Administrator
Augustana University College
4901 - 46 Ave.
Camrose, AB T4V-2R3
Tel 780-679-1572
kopachm at augustana.ab.ca
--
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