How to use a MIB file
Solution 1
First, copy your .mib file into the directory where your script is located.
Then use snmpget in the following format:
snmpget [address] -c [community string] -v 1 -m [mib name] [object to scan]
Then use snmpwalk in the following format:
snmpwalk [address] -c [community string] -v 1 -m [mib name] [object to scan]
On most Linux systems, the MIB files should go to /usr/share/snmp/mibs
or probably /usr/local/share/snmp/mibs
.
Solution 2
Put STRANGE-NEW-MIB.txt in the directory where all your other MIBs are stored (possibly /usr/share/snmp/mibs
, but it may vary with distro, mine is Fedora 14), then do
snmpwalk -v 1 -c public -m +STRANGE-NEW-MIB 1.2.3.4
where you replace public
with the real RO community strong, STRANGE-NEW-MIB
is the name of your new MIB without the .txt suffix (if memory serves), and 1.2.3.4
is the IP address of your switch.
Related videos on Youtube
Wegged
Sysadmin of a small network ~30pc's 2 servers. I like IT, and i'm doing this as an extra responsability at my job. Keeping IT in the company works great for us :)
Updated on September 17, 2022Comments
-
Wegged over 1 year
I have a HP 2626 switch and want to monitor it by SNMP. how can i use the MIB file.
Any starting points on how to understand it ?
usingsnmpwalk
to get the data in a *nix machine and output it in a .txt fileHow can i get a list of all the connected mac-addresses and coresponding ports by snmp from a HP Procurve 2626 ? And then how can i get current port utilization by SNMP?-
Admin over 13 yearsCheck the MIB perhaps?
-
Admin over 13 yearsMIB but i don't know how to use it. any hints ?
-
Admin over 13 yearsWhat tool, on what platform, do you intend to use to do this? At least gives us some clue of the platform you want to do it from. Linux, perhaps?
-
Admin over 13 yearsLinux, i am using snmpwalk, but this returns me all the OID's from the device and i can not make sense of all the data
-
-
eater over 13 yearsYou can also
export MIBS=ALL
so snmpwalk will read every MIB in/usr/share/snmp/mibs
without having to list them all on the command line. Useful since HP probably gave you +/-8 billion MIB files. -
Wegged over 13 yearsyea' i have like 2 dozen files and will take ages to read them out :))
-
bk201 over 3 yearsThe link is dead.