Previous Topic: Boilerplate Text for a Custom MIBNext Topic: Example: Custom MIB 33


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

Create a custom MIB for each query sent to CA NSM as an SNMP trap. Each such query is associated with a custom trap ID. The custom MIB defines the fields selected to include in the trap in the order displayed in the action alert.

Consider the example where the query selected for the action alert is Average CPU Load Trend. The selected fields are event_datetime and event_trend.

Example shows that fields sent in SNMP trap appear in this order: first event_datetime and next event_trend.

The Custom Trap ID is 1.3.6.1.4.1.791.9845.3.33.

The last node, 33, is what users enter for custom trap ID in this example.

To create a custom MIB for the custom trap ID ending in 33

  1. Open a copy of CA-ELM.MIB for the purpose of copying text to your custom MIB.
  2. Open an editor, copy the boilerplate text for custom MIB, and save the file as a new name. For example, save it as Custom MIB n.mib, where n is 33, the final node of the Custom Trap ID specified for the query in the action alert.
  3. (Optional) Under elm MODULE-IDENTITY, replace <###> with 33. For example:
     Custom MIB 33."
    
  4. Replace the following boilerplate text with text from CA-ELM.MIB
    <### Insert elmAlertVariable varbind for each query field in trap sequence ###>
    

    Copy the elmAlertVariable varbinds for event_datetime and then for event_trend. These varbinds must appear in the MIB in the same sequence that they are sent in the SNMP trap. For example:

    event-datetime OBJECT-TYPE
        SYNTAX  DisplayString
        MAX-ACCESS  read-only
        STATUS      current
        DESCRIPTION
    "The calendar date and time expressed in the event information"
        ::= { elmAlertVariables 65 } 
    
    event-trend OBJECT-TYPE
        SYNTAX  Integer32
        MAX-ACCESS  read-only
        STATUS      current
        DESCRIPTION
    "Trending data for this event."
        ::= { elmAlertVariables 74 }
    
  5. Because neither of the fields in this query are calculated fields, delete the following boilerplate text:
    <### 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 } 
    
  6. Replace the following boilerplate text under elmTrap:
    OBJECTS { <### insert list of query fields with hyphens ###> }
    

    with the list of selected query fields, as follows:

    OBJECTS { event-datetime,event-trend }
    
  7. Replace the following boilerplate text under elmTrap:
    ::= { elmAlertTrapGroup <### insert custom trap ID node number ###> }
    

    with the following:

    ::= { elmAlertTrapGroup 33 }
    
  8. Replace the following boilerplate text under elmDataGroup:
    OBJECTS { <### insert list of query fields with hyphens ###> }
    

    with the following:

    OBJECTS { event-datetime,event-trend }
    
  9. Save the file.