FAQ:MIBs 03

From Net-SNMP Wiki
Revision as of 21:41, 25 October 2006 by Dts12 (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Why aren't my mib files being read in?

The Net-SNMP library only loads a subset of MIB files by default. This list is set at when the suite is first configured and compiled, and basically corresponds to the list of modules that the agent supports. (This is a simplification, but is a reasonable first approximation).

You can override this by using the command-line option '-m', the environmental variable 'MIBS' or the snmp.conf directive 'mibs'. Each of these take a (colon-separated) list of MIB module names to load. Starting the list with a '+' character will add them to the default list - otherwise it replaces the defaults.

Using the special value 'ALL' will load all the MIB files that the library can find.


Alternatively, the tools may be looking in the wrong place. The default location for the mib files is /usr/local/share/snmp/mibs. Again, this is set when the suite is first configured and compiled. This can be changed using the environmental variable 'MIBDIRS' or the snmp.conf directive 'mibdirs'.

Note that this may very well affect you if you've installed a new version of the suite manually, replacing one provided by the supplier (which typically would use a more 'central' location).


Finally, are you sure that you've installed the MIB files? If you've compiled the suite from scratch, you need to run "make install" at least once, before the tools will be able to find the MIB files. This is unlikely to be a problem if you've been working with the tools for a while, but can bite those coming fresh to the SNMP world.

   FAQ:MIBs
   
  1. Where can I find a MIB compiler?
  2. Why aren't my MIB files being read in?
  3. Where should I put my MIB files?
  4. What does "Cannot find module (XXX-MIB)" mean?
  5. I'm getting answers, but they're all numbers. Why?
  6. What does "unlinked OID" mean?
  7. The parser doesn't handle comments properly. Why not?
  8. How can I get more information about problems with MIB files?
  9. What's this about "too many imported symbols"?
  10. Do I actually need the MIB files?