Configuring an SNMP trap (example procedure)


If you plan to send SNMP traps, you must identify the events that trigger a policy to send an SNMP trap, even before you define the policy. The following example procedure illustrates how to configure a trap to be sent when a device snapshot fails.

To configure the sending of SNMP traps by events of a policy

  1. Identify the events for which you want to send SNMP traps. Use the event filter (Home > Events > Filter) to help you find the event or events that you are looking for.

    SNMPTrapEvent.png
    In this example, the values of the following columns in the list of events are relevant for the configuration:

  2. Define a keyword and assign the following values that you obtained in the previous step:

    • Set the Type field to Event.
    • Set Category to Device.
    • For Event, select Snapshot request failed.

     
    SNMPAddKeyword.png

  3. Define a condition, assign the keyword to it, and set the following values:

    • For the keyword, assign the event type.
    • Select the Triggering Condition check box.
    • Set Network Span to Entire Network so that a failed snapshot on any device will trigger the trap.

    SNMPAddCondition.png

  4. Define the policy.
     The following figure shows the Details tab of the policy (Snapshot Request Failed Trap).

    SNMPAddPoilcyDetails.png
    The following figure shows the Conditions tab of the policy. A single Triggering Condition called Snapshot Request Failed Now is specified.

    SNMPAddPolicyConditions.png
  5. To configure the trap and associate it with the policy, click the Actions tab of the policy, and then click Add Action > Notifications > Send Trap. In the Send Trap pop-up, enter the following trap information, and then click OK:
    • A name for the annotation.
    • Select the trap type.
    • Select one or more SNMP managers to receive the trap.

      SNMPSendTrap.png  
      In this example, a single action with the following values is specified:

  6. To save the policy, on the Add Policy page, click Save.

In the Policies page, the new policy appears as shown in the following figure (highlighted in red):

SNMPPoliciesList.png

The generated SNMP trap or notification looks similar to the following example:

TrapName: enaTrapActionMedium
enaTypeChangeID:
enaTypeConditionTrace: [Snapshot Request Failed Now=True]
enaTypeAnnotation: Device Snapshot Failed
enaTypeTriggeringDevice: cisco1760-01
enaTypeTriggeringDeviceInstanceID: as assigned by BMCAtrium CMDB
enaTypeTriggeringEventDescription: Device not accessible for Snapshot: check address, ssh public key, and access list settings.
enaTypeServerUrl: https://bcandemo-01

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*