Follow

How to Administer MIB Files in Zenoss Resource Manager

Applies To

  • Zenoss Resource Manager 5.x
  • Zenoss Resource Manager 4.2.x
  • Zenoss Resource Manager 5.x

Summary

This KB provides best practices for managing MIBs in Zenoss Resource Manager. It includes the methods necessary to modify Resource Manager (RM) and import MIBs to make trap event management quick and effective. The information in this KB is intended as an extension of the Zenoss Resource Manager Administration Guide.

Theory

What is a MIB?

A MIB (Management Information Base) is defined as a database of management information called managed objects, that represents a specific resource. A MIB is used and maintained by a network management protocol such as SNMP. The values of the MIB object can be changed or retrieved using SNMP commands. MIBs can also be used to translate values from SNMP traps.

What is an OID?

OIDs (Object Identifiers) are used to identify managed objects within a MIB hierarchy. Each OID is a unique value that consists of a long sequence of numbers separated by periods (.). OIDs follow a strict structure, similar to that of the directory structure on a file system:

  • The top level is always root
  • The level below root is ISO, represented by the number 1.
  • The level below ISO is ORG, represented by the number 3.
  • The level below ORG is DOD, represented by the number 6.

    The number 1.3.6. represents the following OID hierarchy:

    root 
       - ISO 
          - ORG 
              - DOD 

Top level MIB OIDs belong to various standards organizations. Vendors define their own private branches of OIDs for their products.

The following example shows the OID hierarchical structure:

1                   iso
1.3                 org
1.3.6               dod
1.3.6.1             internet
1.3.6.1.1           directory
1.3.6.1.2           mgmt
1.3.6.1.3           experimental
1.3.6.1.4           private
1.3.6.1.4.1         enterprise
1.3.6.1.5           security
1.3.6.1.6           SNMPv2
1.3.6.1.7           mail
1.3.6.1.8           features

Why Load MIBs into Zenoss Resource Manager?

Resource Manager uses MIBs to translate SNMP traps that contain raw OID values. Loading a MIB into the system allows it to translate numeric OIDs (such as .1.3.6.1.2.1.1.6) into descriptive phrases like “sysLocation”. It also makes it easier to manipulate the events in an event mapping or transform. The following diagram shows the SNMP TRAP interactions:

Zenoss Resource Manager Pre-Loaded MIB Files

There are various MIBs available by default after Zenoss Resource Manager is installed. Zenoss recommends as a best practice to load these MIBs prior to importing other MIBS. These include the following MIBs:

  • Internet Assigned Numbers Authority (IANA)
  • Internet Engineering Task Force (IETF)
  • Internet Research Task Force (IRTF)
  • TUBS

These MIBs are located in default directories , depending on the Resource Manager version:

  • In Resource Manager 4:
    $ZENHOME/share/mibs
  • In Resource Manager 5 (within the Zope container):
    /usr/share/mibs

Procedures

Importing Pre-Loaded MIB Files

Prepare the Organizers

  1. Log into Zenoss Resource Manger UI and nagivate to Advanced -> MIBs
  2. Create the following MIB organizers under the top level:
    • IANA
    • IETF
    • IRTF
    • SITE
    • TUBS

Import the MIB Files

Follow the steps appropriate for your Resource Manager version. The steps for Resource Manger v4 are immediately below, scroll down for the Resource Manager v5 steps.

Note:

Resource Manager v4: Import MIB Files

  1. SSH to the Resource Manager master host.
  2. Become the zenoss user.
  3. Navigate to $ZENHOME/share/mibs. The preloaded MIB files are located in this directory.
  4. Determine if the SMIPATH is set: and if not, set it:
    echo $SMIPATH

    If nothing is returned, set SMIPATH:

    	
    export SMIPATH=/opt/zenoss/share/mibs:/opt/zenoss/share/mibs/iana:/opt/zenoss/share/mibs/ietf:/opt/zenoss/share/mibs/irtf:/opt/zenoss/share/mibs/site:/opt/zenoss/share/mibs/tubs
    	
  5. Import the MIBs with zenmib. Change into each directory and issue the zenmib command:
    	cd $ZENHOME/share/mibs/iana
    	zenmib run * --path=/IANA
    
    	cd $ZENHOME/share/mibs/ietf
    	zenmib run * --path=/IETF
    
    	cd $ZENHOME/share/mibs/irtf
    	zenmib run * --path=/IRTF
    
    	cd $ZENHOME/share/mibs/site
    	zenmib run * --path=/SITE
    
    	cd $ZENHOME/share/mibs/tubs
    	zenmib run * --path=/TUBS
    
  6. Restart the zentrap daemon:

    NOTE: the collector must be specified if it is not on the local host.

    zentrap restart

Resource Manager v5: Import MIB Files

Note: Importing MIBs using the zenmib tool does not save MIB files. This means that although the dependencies exist in the database, there are no MIB files in the filesystem. These are are required to import new MIB files. MIB files uploaded via the UI are stored files in the  /opt/zenoss/var/ext/uploadedMIBs directory.  Copy all MIBs from this directory to ensure all dependencies are in place and then install the MIB(s) via the command line or UI.

  1. SSH to the CC Master and as the root user, or another member of the system group.
  2. Navigate to the /tmp directory.
  3. Issue the following commands:
    serviced service run zope zenmib run /usr/share/mibs/iana/* --path=/IANA --mibdepsdir=/usr/share/mibs
    
    serviced service run zope zenmib run /usr/share/mibs/ietf/* --path=/IETF --mibdepsdir=/usr/share/mibs
    
    serviced service run zope zenmib run /usr/share/mibs/irtf/* --path=/IRTF --mibdepsdir=/usr/share/mibs
        	
    serviced service run zope zenmib run /opt/zenoss/share/mibs/site/* --path=/SITE --mibdepsdir=/usr/share/mibs
    
    serviced service run zope zenmib run /usr/share/mibs/tubs/* --path=/TUBS --mibdepsdir=/usr/share/mibs
    
  4. Restart the zentrap process from the Control Center UI.

    NOTE These steps ensure the changes persist after a restart or an upgrade of the Resource Manager application.

Importing Custom/Additional MIBs

As a best practice, Zenoss recommends creating a new MIB organizer/directory for each collection of MIB files to assist with navigation. Additionally, these groups should mirror the MIB sub-directories for additional clarity.

Prepare the Custom Organizers

  1. Log into Zenoss Resource Manger UI and nagivate to Advanced -> MIBs
  2. Create a new MIB organizer under SITE with a meaningful name, for example NetBotz:
    	- MIBS
    	  - SITE
    	    - NETBOTZ
    

Import Custom MIB Files

Follow the steps appropriate for your Resource Manager version. The steps for Resource Manger v4 are immediately below, scroll down for the Resource Manager v5 steps.

Resource Manager v4: Import MIB Files

  1. Copy the MIB files to the RM master.
  2. SSH to the RM master host as the root user, or another member of the system group.
  3. Ensure the MIB files are owned by the zenoss user.
  4. Update the file permissions to 755:
    chmod 755 mib_file_name
  5. Become the zenoss user.
  6. Create a new directory under $ZENHOME/share/mibs/site/. For example, create the new directory $ZENHOME/share/mibs/site/netbotz
  7. Copy the MIB files into the new directory, in this case /netbotz.
  8. Determine if the SMIPATH is set:
    echo $SMIPATH

    If nothing is returned, set SMIPATH:

    	export SMIPATH=/opt/zenoss/share/mibs:/opt/zenoss/share/mibs/iana:/opt/zenoss/share/mibs/ietf:/opt/zenoss/share/mibs/irtf:/opt/zenoss/share/mibs/site:/opt/zenoss/share/mibs/tubs
        
  9. Import the MIBs with zenmib. Replace with the name of the new MIB organizer, for example /SITE/NETBOTZ:
    	cd $ZENHOME/share/mibs/site/
    	zenmib run * --path=/SITE/
    	

    For example:

    cd $ZENHOME/share/mibs/site/netbotz
    	zenmib run * --path=/SITE/NETBOTZ
    	

    If the import is not successful, re-run the zenmib command in verbose mode to help determine the reason for failure:

    zenmib run -v10 * --path=/SITE/

    For example:

    zenmib run -v10 * --path=/SITE/NETBOTZ

    NOTE: In many cases MIB files fail to load due to issues with the format of the MIB file or pre-requisite MIBs not loaded.

  10. Restart the zentrap daemon.

    NOTE: the collector must be specified if it is not on the local host:

    zentrap restart

Resource Manager v5: Import MIB Files

  1. Copy the MIB files to the CC master.
  2. SSH to the CC master host as the root user, or another member of the system group.
  3. Place the MIB files in /tmp directory
  4. Change to the /tmp directory:
    cd /tmp
  5. Update the file permissions to 755:
    chmod 755 mib_file_name
  6. Run zenmibfrom within the Zope container. Replace with the name of the new MIB organizer, for example /SITE/NETBOTZ:
    serviced service run zope zenmib run /mnt/pwd/* --path=/SITE --mibdepsdir=/usr/share/mibs/

    For example:

    serviced service run zope zenmib run /mnt/pwd/NETBOTZ* --path=/SITE/NETBOTZ --mibdepsdir=/usr/share/mibs

    If the import is not successful, re-run the zenmib command in verbose mode to help determine the reason for failure:

    serviced service run zope zenmib run -v10 /mnt/pwd/* --path=/SITE/ --mibdepsdir=/usr/share/mibs

    For example:

    serviced service run zope zenmib run -v10 /mnt/pwd/NETBOTZ* --path=/SITE/NETBOTZ --mibdepsdir=/usr/share/mibs

    NOTE: In many cases MIB files fail to load due to issues with the format of the MIB file or a pre-requisite MIB isn't loaded.

  7. Restart the zentrap process from the Control Center UI.
Was this article helpful?
3 out of 4 found this helpful

Comments

  • Avatar
    Chandan K N

    This article needs to have a section for snapshot deletion that gets created once you run "serviced service run zope zenmib run" .

  • Avatar
    Nagaraju TP **SUSPENDED**

    This article applies for 6.x version also ?

  • Avatar
    Chris De Coster

    A screenshot in this article would help a lot.
    Why is it needed to import pre-loaded mibs?
    Why do we have to create the structure our self? As this seems a task everybody has to do... why is this not prepared by default?
    Why are mibs that come with zenpacks all in the MIBS root, and not in the structure described here?

    Confusing :(

Powered by Zendesk