The trap definition follows the BEGIN_TRAP line. The trap definition is the set of values for specified notification attributes that are placed in the Service Assurance notification. You can define these values in any order. The syntax of a line from the trap definition is:
<notification_attribute>: <value>
Trap definition parameters shows the complete list of parameters to use in a trap definition and in the BEGIN_TRAP line. Each trap definition ends with END_TRAP.
If no parameter values are set within a trap definition BEGIN_TRAP section, the values set in the BEGIN_DEFAULT section are used.
Configuration file parameter |
Corresponding standard notification attribute or description |
Valid values |
---|---|---|
ASL |
For advanced SNMP trap integration, this defines the ASL rule set file used to perform additional processing, which may include additional variable substitution. The ASL rule set must be located in BASEDIR/smarts/local/rules/icoi_trapd. (A sample rule set is available in my_trap-rules.asl.) The ASL processing overwrites any values set in the trap definition section. |
Filename |
Aggregate |
For advanced SNMP trap integration, this defines the mapping of a trap definition to an aggregate notification. One or more component notifications comprise an aggregate notification. “Using the Trap Adapter Aggregate parameter” on page 69 provides details and examples.
Note:
The Aggregate field is not supported in the Default Section of the file. |
Special
|
Category |
Category |
Any string |
ClassName |
ClassName and DisplayClassName |
Any string |
ClearOnAcknowledge |
ClearOnAcknowledge |
TRUE or FALSE |
Discard |
Discard the event information captured by the trap:
|
YES, NO, or IF_MANAGED
Note:
IF_MANAGED requires that the ICOI server subscribes to all underlying IP servers for consideration to determine if the device that originated the trap is managed. |
ElementClassName |
ElementClassName |
Valid Class Name in topology. |
ElementName |
ElementName |
Valid Instance Name in topology. If you set the UnknownAgent to CREATE, then the instance does not have to previously exist.
Note:
If the UnknownAgent parameter is configured to CREATE, the ElementClassName and ElementName parameters must be defined in the trap_mgr.conf file. |
EventName |
EventName (describing the notification) and the EventDisplayName |
Any string |
EventText |
EventText |
Any string |
EventType |
EventType:
|
MOMENTARY or DURABLE |
Expiration |
Defines the expiration time in seconds for the notification. Zero indicates that the notification will not expire. 7200 is the default value. If you use zero, you should use some method to eventually clear the notification. For example, you can configure the SNMP Trap Adapter to send clear state notifications or set the ClearOnAcknowlege parameter to TRUE. |
Integer |
ForceOccurredOn |
Overwrite the ElementClass or ElementName to modify the OccurredOn object.
Note:
If ElementClass and ElementName are undefined, the trap defaults to the Agent name if it is defined. |
TRUE or FALSE |
InMaintenance |
InMaintenance |
TRUE or FALSE |
InstanceName |
InstanceName (of the object associated with the notification) and InstanceDisplayName. |
Any string |
LogFile |
The name of the file used by the SNMP Trap Adapter to log information for this trap. If this parameter is NONE or undefined, no information is logged. If this parameter is undefined, the default value is used.
Note:
Log files contain any error messages with line numbers of the trap_mgr.conf to help you find and correct the error. |
Filename |
Map |
Map is a special field that enables you to map varbinds to one or more printable strings. “Using the Map parameter” on page 67 and “Using the Map parameter with tags” on page 68 provide more information and examples of how to map varbind values.
Note:
The Map field is not supported in the Default Section of the file. |
Special |
Severity |
Severity |
Any integer from 1 to 5 |
State |
Describes the state of the notification. |
NOTIFY or CLEAR |
SysNameOrAddr |
A valid value describes either the system name or address of the entity that sent the trap. Values for this parameter override values in ElementClassName and ElementName. |
Any string |
TrapSource |
Define the name of your trap processor so that it more closely identifies the function or form of your traps. The default name isTrap Processor. |
Any string |
UnknownAgent |
Describes whether Adapter Platform should ignore traps related to unknown topology elements or create elements for the traps. |
CREATE or IGNORE
Note:
If the UnknownAgent parameter is configured to CREATE, the ElementClassName and ElementName parameters must be defined in the trap_mgr.conf file. |
UpdateUD |
Update the user-defined trap and data with a CLEAR. |
TRUE or FALSE |
UserDefined1-10 |
UserDefined1-10 |
Any string |
In the SNMP Trap parametes table and the corresponding trap definition, certain values in the SNMP trap were used as attribute values in the notification. This is accomplished through the use of variable substitution. SNMP variable bindings (varbinds) are placeholders for information common to standard SNMP traps and can be assigned to Service Assurance notification attributes within the trap definitions in the trap_mgr.conf file. The following two lines are taken from the trap definition based on SNMP Trap parametes that use variable substitution:
InstanceName:$SYS$ EventText:Agent $SYS$ restarted, reason=$V1$
The attribute InstanceName is populated with the value of a variable $SYS$. The contents of this variable come from the incoming trap. In this example, $SYS$ is the name of the system where the trap originated, and $V1$ represents the value of the first varbind. The SNMP Trap Adapter variables describes the variables available for basic SNMP trap integration. When specifying a variable, it must be enclosed within dollar signs ($).
Variable |
Description |
---|---|
$A$ |
Address of the agent sending the trap. |
$C$ |
Community string of the SNMP trap.
Note:
To use this variable, you must start the trap adapter with the --community option. |
$E$ |
Enterprise OID of the SNMP trap. |
$N$ |
Generic trap number of the SNMP trap. |
$S$ |
Specific trap number of the SNMP trap. |
$SRC$ |
Source, or originator, of the IP address for the trap. A V1 trap may return the source IP address of the relay agent for the trap.
Note:
To use this variable, you must specify the --source parameter. |
$SYS$ |
System where the SNMP trap originated. |
$T$ |
Timestamp of the SNMP trap. |
$V<n>[-<tag>]$ or $OID<n>[-<tag>]$ or $V<*>$ or $OID<*>$ |
Value of the <n>th varbind. The varbind may contain one of the following data types: integer, bit-string, octet-string, IP address, counter, gauge, unsigned integer, time ticks, counter 64, obj id, opaque, or null. Optionally, you can use a text string to tag the value of the <n>th varbind for multiple mappings. You can also use an asterisk <*> to specify all varbinds. |