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.

Note:

If no parameter values are set within a trap definition BEGIN_TRAP section, the values set in the BEGIN_DEFAULT section are used.

Table 1. Trap definition parameters

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

  • EventName:<string>

    This is the name of the aggregate notification and is required.

  • ElementName:<object-handle>

    An object-handle identifies the InstanceName and the CreationClassName of an element.

    This is the name of the topology element where the aggregate is defined. This field is optional. If this field is not defined, the ElementClassName and ElementName of the trap definition are used, if available. Otherwise, the ClassName and InstanceName of the trap definition are used.

    If you define this field and specify an object-handle that does not exist in the topology, then the aggregate is not created.

  • EventText:<string>

    This is the description of the aggregate notification (event). This field is optional.

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 discards event information.

  • NO saves event information.

  • IF_MANAGED allows a discard of the event information if the device is managed by another connected server, thus avoiding possible duplicate event information from both servers.

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 sends notifications of events with no duration, such as a coldStart trap. Clears after the Expiration interval.

  • DURABLE sends notifications of events with an active and inactive state, such as linkDown and linkUP traps.

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 figure 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 the figure 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. SNMP Trap Adapter variables describes the variables available for basic SNMP trap integration. When specifying a variable, it must be enclosed within dollar signs ($).

Table 2. SNMP Trap Adapter variables

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.