SNMP Management Information Bases (MIBs)can be used by Zenoss to interpret SNMP TRAPs. NOTE that imported MIBs are not used for helping to create SNMP performance templates.
For example, if the SNMPv2-SMI MIB is imported into Zenoss, then a TRAP will be interpreted with an eventClassKey that starts enterprises. ; if the SNMPv2_SMI is not imported the field will start 18.104.22.168.4.1. This field is also propagated to the summary field and any variables with the TRAP will also have their Object Id (OID) name translated to start with enterprises. As more MIBs are imported, the translation becomes more complete. For example, if the NET-SNMP-AGENT-MIB is imported then instead of receiving a TRAP with OID 22.214.171.124.4.1.8072.4.0.2, it will be translated to nsNotifyShutdown.
- It is possible to import a MIB using the Zenoss GUI but it is safer to do this using command line so that any error messages are displayed. MIB importing must be performed as the zenoss user.
- Many MIBs are shipped with Zenoss under $ZENHOME/share/mibs. There are 4 subdirectories for standard MIBs
* ietf contains many standard MIBs * irtf * iana * tubs
- The 5th directory, site, is the correct place to put other MIBs that you wish to import into the Zenoss Zope database.
- To import a standard MIB under the ietf directory, change directory to that directory and use the zenmib command
cd $ZENHOME/share/mibs/ietf zenmib run -v 10 SNMPv2-SMI
Watch for any error messages (the -v 10 sets verbose logging). You should see a message at the end that says objects have been imported. Check on the GUI (ADVANCED -> MIBs). Most MIBs should show imported OIDs; some will also show TRAPs (depending on whether the source file contained TRAPs). A few MIBs only have high-level definitions so may show 0 OIDs and 0 TRAPS but if you see this, it is more likely that there is a problem.
- To import a MIB that you have downloaded from the internet, place it under the site subdirectory and run
zenmib run -v 10
This will attempt to import all MIB files under the site directory. If a MIB is already imported then a benign warning message will be issued. You could also give the name of the single MIB that you wish to import.
If the MIB requires non-standard pre / co-requisite MIBs, they should also be placed in the site directory. To import a specific MIB, such as NET-SNMP-AGENT-MIB, which has several standard SNMPv2 import dependencies plus a dependency on NET-SNMP-MIB, put both NET-SNMP-MIB and NET-SNMP-AGENT-MIB under site. The verbose logging shows that each of the 4 standard subdirectories are automatically searched for import dependencies, along with the site directory.