[mrtg] Re: Monitor CRC & Framing Errors

Hans Dekker hans.dekker.ext at juntadeandalucia.es
Wed Jun 16 09:48:36 MEST 2004


Hi,

Try the interface template file below. It's a modified copy of an MRTG 
example. I used it to collect the CRC and FCS errors on switch ports. 
When a port gives trouble mostly these errors numbers rise.

The OID's are the common ones (as far as I could see).

etherStatsCRCAlignErrors        OID: 1.3.6.1.2.1.16.1.1.1.8.port#
etherStatsFragments		OID: 1.3.6.1.2.1.16.1.1.1.11.port#

The command to generate your .cfg file would be:

C:\> perl cfgmaker \
	--if-template=switch_err.pl \
	--show-op-down \
	--global "WorkDir: <your workdir>" \
	--global "RunAsDaemon: yes" \
	--global "LoadMIBs: <your mib files>" \
	--output=<your device>.err.cfg

The switch_err.pl file has the following content (it gives output to 
show also offline ports and mentions it on the output web page):

$head_lines .= <<ECHO;
#---------------------------------------------------------------------
ECHO

my $target_name = $router_name . "." . $ifindex . ".err";

# Check ethernet devices only. See documentation of cfgmaker.

if ( $if_is_ethernet eq 1 ) {

$target_lines .= <<ECHO;

Target[$target_name]: 
etherStatsCRCAlignErrors.$ifindex&etherStatsFragments.$ifindex:$router_connect
YLegend[$target_name]: errors on Port
ShortLegend[$target_name]: errors / sec
Legend1[$target_name]: CRC errors
Legend2[$target_name]: FCS errors
Legend3[$target_name]: max 5 min CRC errors
Legend4[$target_name]: max 5 min FCS errors
LegendI[$target_name]: &nbsp;CRC errors:
LegendO[$target_name]: &nbsp;FCS errors:
WithPeak[$target_name]: dwmy
MaxBytes[$target_name]: 10000
Options[$target_name]: integer, unknaszero, nopercent
ECHO

# Check if device is operational

	if ( $if_oper eq 1 ) {

$target_lines .= <<ECHO;
Title[$target_name]: Switch $router_name port $ifindex FCS and CRC 
errors speed $if_speed_str
PageTop[$target_name]: <H1>Switch $router_name port $ifindex speed 
$if_speed_str (at build time) FCS and CRC errors</H1>
   <TABLE>
      <TR><TD>System:</TD><TD>Switch $router_name in $html_syslocation 
port $ifindex speed $if_speed_str (at build time)</TD></TR>
ECHO

	} else {

$target_lines .= <<ECHO;
Title[$target_name]: Switch $router_name port $ifindex not operational
PageTop[$target_name]: <H1>Switch $router_name port $ifindex not 
operational (at build time)</H1>
   <TABLE>
      <TR><TD>System:</TD><TD>Switch $router_name in $html_syslocation 
port $ifindex not operational (at build time)</TD></TR>
ECHO

	}
	
$target_lines .= <<ECHO;
     <TR><TD>Maintainer:</TD><TD>$html_syscontact</TD></TR>
     <TR><TD VALIGN="top">Description:</TD><TD>$html_sysdescr</TD></TR>
     <TR><TD ifType:</TD><TD>$if_type</TD></TR>
     <TR><TD>Resource:</TD><TD>RMON FCS and CRC errors, equiv 
etherStatsFragments and etherStatsCRCAlignErrors. See ETHERLIKE-MIB for 
a description</TD></TR>
   </TABLE>
ECHO

}

hdevito at qwest.net escribió:
> I can see the appropriate figures,  I just can't seem to make MRTG collect
> the correct data.  this is the first setup of MRTG I have done.  I'm kinda
> confused of what my config should look like.  This is what I have,  Does it
> look correct?  This is only one serial port of course.
> 
> Target[192.100.108.1_2]:
> 1.3.6.1.2.1.16.1.1.1.8/192.100.108.1&1.3.6.1.2.1.16.1.1.1.8/192.100.108.1:co
> mmunityName at 192.100.108.1
> 
> YLegend[192.100.108.1_2]: Errors
> 
> ShortLegend[192.100.108.1_2]: Errors
> 
> MaxBytes[192.100.108.1_2]: 193000
> 
> Options[192.100.108.1_2]: nopercent, unknaszero
> 
> Legend1[192.100.108.1_2]: CRC Align Errors
> 
> Legend2[192.100.108.1_2]: CRC Align Errors
> 
> Legend3[192.100.108.1_2]: Max value per interval on graph
> 
> Legend4[192.100.108.1_2]: .
> 
> LegendI[192.100.108.1_2]: CRC Align Errors
> 
> LegendO[192.100.108.1_2]: CRC Align Errors
> 
> Title[192.100.108.1_2]: South Side Serial 1
> 
> PageTop[192.100.108.1_2]: <H1>South Side Serial 1</H1>
> 
> Colours[192.100.108.1_2]: GREEN#00eb0c,BLUE#0000ff,GRAY#AAAAAA,VIOLET#ff00ff
> 
> WithPeak[192.100.108.1_2]: ymw
> 
> 
> 
> 
> ----- Original Message ----- 
> From: "Pete Templin" <petelists at templin.org>
> To: <hdevito at qwest.net>
> Cc: <mrtg at list.ee.ethz.ch>
> Sent: Saturday, June 05, 2004 11:45 AM
> Subject: Re: [mrtg] Monitor CRC & Framing Errors
> 
> 
> 
>>hdevito at qwest.net wrote:
>>
>>>Hi,  I wuld like to monitor CRC and Framing errors on the serial
>>>ports of 1720 routers.  I have 11 1720's and 21 Serial ports (T1's)
>>>that I need to monitor.  It would be great to just to browse to a
>>>webpage and check for errors rather than log in to each router.  I
>>>tried using the CRC template off somix.com.  MRTG creates the graphs
>>>and looks like it's querying the routers, but no data is displayed.
>>>Anyone that could help would be greatly appreciated.  Thanks in
>>>advance.
>>
>>YMMV, but the DS1 MIB should be available on these units, or at least
>>something similar.  All of the error counters are available through this
>>MIB.  Can you see appropriate figures if you poll the router manually?
>>
>>A few additional notes on this topic: because MRTG might not take the
>>same amount of time to process its targets on unique runs, your timing
>>may not end up right at 300 second intervals, and it's next to
>>impossible to sync up with the 15-minute intervals where DS1 devices
>>keep these statistics.  As such, I monitor both the current interval and
>>the previous interval at the default five minute interval, knowing that
>>a few caveats apply:
>>
>>1) I will "miss" the last 0-299 seconds in each 15 minute interval, and
>>capture less than 300 seconds during the beginning of the new 15 minute
>>interval, on one poll every three.
>>2) I will capture the errors missed in #1 by polling the previous
>>interval, but will get the same results for three polls in a row (since
>>the previous interval becomes the previous previous interval every
>>fifteen minutes).
>>
>>I use threshold monitoring to capture moderate and high levels.  I have
>>a simple script that treats the "Min" and "Max" thresholds as "info" and
>>"alert" (i.e. the safe zone is below the info and alert levels, NOT in
>>between the Min and Max levels as the default logic assumes).
>>
>>Now I just need to develop a way to integrate some of my automated page
>>generation tools with RRDTool and a companion graph-building CGI, so I
>>can get the CPU load down on my poor monitoring box...
>>
>>pt
>>
> 
> 
> --
> 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