Translation of SNMP trap to standard notification shows an example of a simple trap and how values in the trap might populate fields in a Service Assurance notification. In this example, the SNMP trap consists of five values:
-
Enterprise OID
-
Generic Trap Number
-
Specific Trap Number
-
System Name
The system name sent by the trap translates into the instance name.
-
Varbind 1
Varbind 1 translates into a text message for the notification.
Other fields in the notification get populated from values placed in the configuration file. For example, the ClassName is Host not because the information was sent with the trap, but because an association was made in the configuration file.
.1.3.6.1.4.1.2.1
0
0
HostNYC8
Operator requested reboot
SNMP Trap (simplified)
.1.3.6.1.4.1.2.1
0
0
HostNYC8
Operator requested reboot
Enterprise OID
Generic Trap Number
Specific Trap Number
System Name
Varbind 1
Incoming SNMP Trap
Cold Start
HostNYC8
InstanceName
EventName
Host
ClassName
EventType
MOMENTARY
EventText
Agent HostNYC restarted, reason=Operator requested reboot
Severity
5
Standard Notification Fields
For this example, no translation into any standard notification fields. These fields are used as keys to the configuration file.
The following is an example of a portion of the configuration file used by the SNMP Trap Adapter. This example corresponds to Translation of SNMP trap to standard notification. When the trap matches a trap definition (Enterprise OID, generic trap number, and specific trap number), the Adapter Platform populates attributes in a notification based on entries in the trap definition. In the example, the standard notification attribute ClassName is populated with the value Host:
BEGIN_TRAP .1.3.6.1.4.1.2.1 0 0 ClassName: Host InstanceName: $SYS$ EventName: Cold Start Severity: 5 EventType: MOMENTARY EventText: Agent $SYS$ restarted, reason=$V1$ END_TRAP