From: direct@klatha.com Subject: [mail-toaster] Using rrdutil to monitor switches Date: May 4, 2004 7:08:18 PM EDT To: mail-toaster@simerson.net
I just set up my copy of rrdutil to monitor network traffic across my switch. I thought I'd document what I did in case others wish to do the same thing.
First, I did a lot of reading about SNMP and various MIBs. Most of this turned out to be unnecessary since there is a standardized layout for SNMP data about network traffic, and most devices can be polled using the same set of OIDs that RRDUtil already uses to monitor the interfaces on NET-SNMP hosts.
Basically, all I needed was to find the names of the interfaces for each port on my switch, which I did as follows:
# snmpwalk -v 2c -c public 192.168.1.254 .1.3.6.1.2.1.2.2.1.2 IF-MIB::ifDescr.1 = STRING: RMON Port 1 on Unit 1 IF-MIB::ifDescr.2 = STRING: RMON Port 2 on Unit 1 IF-MIB::ifDescr.3 = STRING: RMON Port 3 on Unit 1 IF-MIB::ifDescr.4 = STRING: RMON Port 4 on Unit 1 ...
- "public" is the SNMP community string my switch uses
- 192.168.1.254 is the IP address of my switch
- That long string of numbers at the end is saying "give me the names of all the interfaces on the device."
The "STRINGs" returned are the names of the interfaces for each port on the switch-- your switch may name these ports differently than mine. Once I had these, configuring rrdutil was as easy as adding the following to rrdutil.conf:
auth2 = 192.168.1.254, snmp, 2, public monitor21 = 192.168.1.254, net, RMON Port 1 on Unit 1, port1 monitor22 = 192.168.1.254, net, RMON Port 2 on Unit 1, port2 monitor23 = 192.168.1.254, net, RMON Port 3 on Unit 1, port3 monitor24 = 192.168.1.254, net, RMON Port 4 on Unit 1, port4 ...
There was one more hitch-- the current version of rrdutil has a little bug which prevents rrdutil from properly finding interfaces on systems with more than 9 of them. Usually this would only be a problem on a switch. Matt has my patch for this, but I'll include it in the bottom of this message also, since it is SO simple to fix.
That's all there is to it... Now there's a graph for each switch port available through rrdutil.cgi
Hope this helps someone out.
David
