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
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.
In this example, the values of the following columns in the list of events are relevant for the configuration:
Snapshot request failed
Primary Interface: Unable to log in to device for Snapshot: check username/password, device type settings, and maximum session limits.
- 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.
- 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.
- Define the policy.
The following figure shows the Details tab of the policy (Snapshot Request Failed Trap).
The following figure shows the Conditions tab of the policy. A single Triggering Condition called Snapshot Request Failed Now is specified.
- 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.
In this example, a single action with the following values is specified:
Device Snapshot Failed
Action Executed, Medium Severity
- 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):
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