Previous Topic: Custom MIBs

Next Topic: Example: Create Custom MIB 33 for the Average CPU Load Trend Query

Boilerplate Text for a Custom MIB

Boilerplate text for a custom MIB follows. If you start a custom MIB with this example, you can replace or insert custom data in locations indicated with the string ###. In sections where you modify data, you can, optionally, modify the description.

CAELM-MIB DEFINITIONS ::= BEGIN
  IMPORTS
        MODULE-IDENTITY, OBJECT-TYPE, Integer32, NOTIFICATION-TYPE
                FROM SNMPv2-SMI
MODULE-COMPLIANCE, OBJECT-GROUP,NOTIFICATION-GROUP
                FROM SNMPv2-CONF				DisplayString
               FROM SNMPv2-TC;                
                
elm MODULE-IDENTITY
    LAST-UPDATED "200907050600Z"
    ORGANIZATION "CA"
    CONTACT-INFO
        "100 Staples drive
        Framingham MA" 
    DESCRIPTION
        "Contains objects describing data for ELM events"
    REVISION "200907050600Z"
    DESCRIPTION
        "Custom MIB <###>."        
    ::= { ca 9845 }

ca OBJECT IDENTIFIER ::= {enterprises 791}  
elmAlertTrapGroup OBJECT IDENTIFIER ::= { elm 3 }  
elmAlertVariables OBJECT IDENTIFIER ::= { elm 2 }  
elmDynamicVariables OBJECT IDENTIFIER ::= { elm 4 }
elmConformance OBJECT IDENTIFIER ::= { elm 5 }
elmGroups      OBJECT IDENTIFIER ::= { elmConformance 1 }
elmCompliances OBJECT IDENTIFIER ::= { elmConformance 2 }


<### Insert elmAlertVariable varbind for each query field ###>

<### Insert the following dynamicData varbind only if query includes calculated fields ###>
dynamicData OBJECT-TYPE
    SYNTAX  DisplayString
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
" This field contains all the elm dynamic variables and data in name=value format."
    ::= { elmDynamicVariables 2 } 

calmAPIURL OBJECT-TYPE
    SYNTAX  OCTET STRING
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
"The OPEN API URL which points to the query result."
    ::= { elmDynamicVariables 1 } 

elmTrap NOTIFICATION-TYPE
    OBJECTS { <### insert list of query fields with hyphens ###> }
    STATUS  current
    DESCRIPTION
            "The ELM SNMP Trap."
    ::= { elmAlertTrapGroup <### insert custom trap ID node number ###> }

elmCompliance MODULE-COMPLIANCE
    STATUS  current
    DESCRIPTION
            "The compliance information."
    MODULE  -- this module
        GROUP       elmDataGroup
        DESCRIPTION
            "This group is mandatory."
    ::= { elmCompliances 3 }
-- units of conformance

elmDataGroup    OBJECT-GROUP
    OBJECTS { <### insert list of query fields with hyphens ###> }    
    STATUS  current
    DESCRIPTION
            "A collection of objects providing information specific to
            ELM data."
    ::= { elmGroups 1 }
END