-
Notifications
You must be signed in to change notification settings - Fork 2
Loading_your_own_MIBs
I've created my own MIB, placed it in /usr/share/snmp/mibs (which is where I believe it should go) but yet and the other tools fail to find it.
It is highly likely that one of the following issues is you problem:
There is a good tutorial on loading MIBs into the tools. Please make sure you read the page too.
If you have a syntax error in your MIB file, even if you do everything else right snmptranslate and related tools will still fail to find it.
A good thing to do always before trying to use your MIB is run it through a syntax checker. The best freely-available syntax checker out there is probably smilint from the libsmi package.
Before you do anything else with your mib, install libsmi and run smilint on your MIB
It is also possible that your MIB loading paths are incorrect. You can always add the -M flag to your tool to make sure your directory is being searched:
snmptranslate -M +/my/path/to/my/mibs
Debugging what is actually going on will help too (see below)
The best test you could do to try and load you mib is using your MIB name and the mib node name in combination. This is the safest loading test:
snmptranslate MY-NAMED-MIB::myMibNodeName
When all else fails, be prepared to examine the dump details for exactly what might be going wrong as it loads the MIBs. To do this (which requires net-snmp was build with the debugging output left in place) use the -Dparse flag:
snmptranslate -Dparse MY-NAMED-MIB::myMibNodeName
warning: lots of (useful) data will be printed
Category:MIBs