Skip to content

Using SNMPwalk and a vendor MIB file

by karlkatzke on November 6th, 2007

Ok, so you’ve got this [ hot new APC unit, new RAID array, network switch, router ]. The vendor, in their infinite wisdom, supplied a driver disk. But the device got a web management interface, so you just monitor things through there and watch for any problems to pop up. That MIB file can be used to get the names for the SNMP array address of different values. Here’s how.

First, copy your .mib file into the /usr/share/snmp/mibs/ directory (or your linux distro equivalent). Then use snmpwalk in the following format:

snmpwalk [address] -c [community string] -v 1 -m [mib name] [object to scan]

The mib name is usually one of the first lines of the MIB; for the ACNC JetStor devices at work, it’s “ARECA-SNMP-MIB” and found on the first line, right before “DEFINITIONS ::= BEGIN”.

If you’re on Windows, you have a choice of several freeware applications that will happily take your MIB file and scan a device for you.

After you’ve got the path to the value you want to monitor, you can set up plugins in Nagios and other programs to monitor those addresses.

From → linux, sysadmin

3 Comments
  1. Kris Kirby permalink

    cd /usr/local/share/snmp/mibs

    snmpwalk [address] -c [community string] -v 1 -M . -m [mib name] [object to scan]

    works as well.

  2. stevechan permalink

    use the command

    snmpwalk -c democommunity -v 1 -M. -m .1.3.6.1.4.1.32275.3

    produces a walk but with the message ” cannot find the module .1.3.1.6.1.4.1.32275.3. The latter is exactly the vendor mib object I want to walk through.

    Help?

    Thanks and regards

    Steve

  3. Marty permalink

    Steve, I don’t know how old your question/comment is because there are no time stamps on this website

    I found it via google.. anyway the reason your command isn’t working is because you have too many flags

    The correct way to write your statement is without the extra “-M.” and best to specific the device you are asking to communicate with. Plus you’re using an OID in your statement (.1.3.6….). Make sure your box is part of the snmp community, your version matches (v2c, or v1), the ip of the box you are talking to and your OID are correct

    snmpwalk -c democommunity -v 1 “ip.of.server.here(no quotes)” .1.3.6.1.4.1.32275.3

Leave a Reply

Note: XHTML is allowed. Your email address will never be published.

Subscribe to this comment feed via RSS