The trapd.conf file is located under:

  • For Trap Adapter: <BASEDIR>/smarts/conf/trapd directory

  • For Trap Exploder: <BASEDIR>/smarts/conf/icoi directory

    You need to use sm_edit to edit the parameters in the trapd.conf file. Parameters in trapd.conf file lists and describes the parameters in the trapd.conf file.

Table 1. Parameters in trapd.conf file

Configuration file parameter

Description

Valid values

Applicable for Adapter or Exploder

PORT

The UDP port number the trap adapter listens to.

If NetView or OpenView is running on this system, during installation, the value is set to 9000, otherwise it is set to 162

0-65535

Adapter

WINDOW

This is the de-duplication window, in seconds. The maximum amount of time between receiving similar traps, before the second trap is considered unique.

To disable de-duplication feature make all traps unique. That is, do not specify a value for this parameter or use zero. If a value is not specified for this parameter, or it is set to zero, de-duplication is disabled.

Non-negative integer

Adapter

THREADS

The number of trap processing threads to spawn. The determines how many traps can be processed concurrently. The maximum value is 25. If not set, the default value is 1.

0 - 25

Adapter and Exploder

ASCII

This controls the formatting of non-printable characters. If the value for ASCII is set to FALSE or if “--ascii” is not specified on the commandline for starting sm_trapd, sm_trapd converts the entire value of that OID into a printable UTF-8 coding string, such as a varbind. For example, .1.3.6.1.4.1.333.1 -> "abcd012" is converted into .1.3.6.1.4.1.333.1 -> "61 62 63 64 C3 96 30 31 32".

If the value for this parameter is set to TRUE or if “--ascii” is specified on the commandline for starting sm_trapd, sm_trapd replaces all the non-printable characters with an “X” followed by the HEX string of these characters using UTF coding. The remaining printable characters of the original value (octet-string) remain unchanged, such as the varbind. For example, .1.3.6.1.4.1.333.1 -> "abcd012"

is then converted into .1.3.6.1.4.1.333.1 -> "abcdXC3X96012."

TRUE | FALSE

Adapter and Exploder

SOURCE

This switch enables the trap processor to obtain the source address of the IP packet, and makes it available to the customer configurable .conf file and .asl scripts. If not set, value is FALSE.

TRUE | FALSE

Adapter and Exploder

TAG

Enables tagging of varbind values. When enabled, it streams the value's type before each value. For example, INTEGER-32 3.

TRUE | FALSE

Adapter and Exploder

QUEUE_LIMIT_MEGS

This parameter helps limit the size of internal trap queue to the stated size. The limit is not exact - the queue may grow slightly larger than that. When the limit is reached, some traps will be discarded. The default value is set to 200 MB. On reaching this limit, the sm_trapd queue starts discarding traps.

When the queue starts discarding traps, a trapdDiscardingTraps alert is generated, as defined in the trap_mgr.conf file. If and when a device is identified as the source of a trap storm, information about it is logged in the sm_trapd log file. The alert is cleared once the incoming trap rate to the sm_trapd reduces to a rate below which these traps can be processed by the queue.

Non-negative integer

Adapter and Exploder

QUEUE_LIMIT_SECONDS

Limit the time that a trap can remain in the internal trap queue. This limit is even less exact than the size limit above. In general, it is advisable to specify both. When traps start to remain in the queue exceeding the time limit set, some traps will be discarded. The default value is set to 480 seconds.

When the queue starts discarding traps, a trapdDiscardingTraps alert is generated, as defined in the trap_mgr.conf file. If and when a particular device is identified as the source of a trap storm, information about it is logged in the sm_trapd log file. The alert is cleared once the incoming trap rate to the sm_trapd reduces to a rate below which these traps can be processed by the queue.

Non-negative integer

Adapter and Exploder

ENABLE_FWD

This parameter enables trap forwarding. Traps are only forwarded if a forwarding criteria is specified. See the FORWARD parameter for more information.

TRUE | FALSE

Exploder

MATCH

Determines whether traps are tested against all forwarding criteria or up to the first criterion that matches. If forwarding criteria is not specified, this parameter is ignored. Forwarding criteria is specified in this file using the FORWARD parameter. If not set, value is first.

all | first

Exploder

TIMESTAMP_RCV

When receiving a trap, whether to forward the time from the trap to ASL as the received time of the trap. The original behavior of the trap processor received timestamps of this format and this option allows that behavior. If set to FALSE this defaults to sending the timestamp from the trap itself which is in normal SNMP time format of hundredths of a second since device boot.

TRUE | FALSE

Adapter and Exploder

FORWARD

Specifies the matching criteria for incoming traps and the forwarding destinations for matched traps.

Valid syntax is:

<source device address> <OID> <generic type> <specific type> \     <destination host address>[:<port>|:<port>:<community>] \          [<destination host address>[:<port>|:<port>:<community>]] ...

where:

  • <source device address> is the IP address (IPv4, IPv6) of the object (SNMP agent) that is generating the trap.

  • <OID> is the sysObjectID of the type of object that is generating the trap.

  • <generic type> is the generic trap type:

    0 coldStart

    1 warmStart

    2 linkDown

    3 linkUp

    4 authenticationFailure

    5 egpNeighborLoss

    6 enterpriseSpecific

    Valid syntax for <generic type> is a generic specific trap number (for example, 3), a range of generic specific trap numbers (for example, <3-5>), or any generic specific trap number (for example, *). An asterisk is a wildcard character that matches any arbitrary string of characters.

  • <specific type> is the specific trap code, present even if <generic type> is not enterpriseSpecific (6).

    Valid syntax for <specific type> is an enterprise specific trap number (for example, 733), a range of enterprise specific trap numbers (for example, <130-156>), or any enterprise specific trap number (for example, *).

Globbing can be used to specify values of the following fields: <address>, <OID>, <generic type>, <specific type>. Field description lists and describes the fields:.

Table 2. Field description

Field name

Description

<address>

Source IP address or host name of the SNMP agent sending the trap. Globbing can be used to specify ranges of IP addresses.

Examples of valid values:

192.168.114.5

3ffe:80c0:22c:109:214:4fff:fe39:a73d

*.*.*.*

*:*:*

192.168.*.*

3ffe:80c0:22c:*

*.*.*.168

*:*:a73d

192.168.<120-123>.*

3ffe:80c0:22c:109:214:4fff:<0-ffff>:*

<OID>

Enterprise OID of incoming trap. Globbing can be used to specify ranges of OIDs. Examples of valid values:

.1.3.6.4.1.9

.1.3.*

.*

.1.3.6.4.1.<1-18>.*

<generic type>

Generic type of incoming trap. Globbing can be used to specify ranges of trap numbers. Examples of valid values: 0, 3, <0-5>

<specific type>

Specific type of incoming trap, if valid. For standard (generic) traps this field is ignored. Globbing can be used to specify ranges of trap numbers. Examples of valid values:

733, <130-156>, *

<host <[:port] | [:port:community]>>

Destination to forward matched traps to. Multiple destinations can be specified. Host is specified as an IP address or a host name. Port and Community are optional; IPv6 addresses need to be enclosed in square brackets [] if omitted, port 162 is used and the community string of the incoming trap is preserved. Globbing cannot be used in this field. Examples of valid values: cobra, snake.planet.net:6789, 192.76.70.21, [3ffe:80c0:22c:109:214:4fff:fe39:a73d]:2002, 192.168.70.190:6789

Some more examples:

  • All traps from all IPv4 addresses are forwarded to IPv6 host gifted.yahoo.com on port 2002:

     FORWARD: *.*.*.* .* * * gifted.yahoo.com:v6:2002
    
  • All traps from all IPv6 addresses are forwarded to IPv6 host gifted.yahoo.com on port 2002:

     FORWARD: *:*:* .* * * gifted.yahoo.com:v6:2002
    
  • All traps from all IPv6 addresses are forwarded to IPv6 host with address 3ffe:80c0:22c:109:214:4fff:fe39:a73d on port 2002:

     FORWARD: *:*:* .* * * [3ffe:80c0:22c:109:214:4fff:fe39:a73d]:2002
    
  • All traps from all IPv4 addresses are forwarded to IPv6 host gifted.yahoo.com on port 2002, smarts OIDs smTrapAddress and smTrapAddressType are not added when forwarding.

     FORWARD: *.*.*.* .* * * -nosmtrapaddr gifted.yahoo.com:v6:2002
    
  • All traps from all IPv6 addresses are forwarded to IPv6 host gifted.yahoo.com on port 2002, smarts OIDs smTrapAddress and smTrapAddressType are not added when forwarding.

     FORWARD: *:*:* .* * * -nosmtrapaddr gifted.yahoo.com:v6:2002
    
  • All traps from all IPv6 addresses are forwarded to IPv6 host with address 3ffe:80c0:22c:109:214:4fff:fe39:a73d on port 2002, smarts OIDs smTrapAddress and smTrapAddressType are not added when forwarding.

     FORWARD: *:*:* .* * * -nosmtrapaddr [3ffe:80c0:22c:109:214:4fff:fe39:a73d]:2002
    
  • All traps from all IPv4 addresses are forwarded to IPv4 host amtest.smarts.com (on the default SMTP port) and IPv6 host gifted.yahoo.com (on port 2002). MIB variables smTrapAddress and smTrapAddressType are added when forwarding to amtest.smarts.com (default behavior). The same OIDs are not added when forwarding to gifted.yahoo.com, due to the -nosmtrapaddr option that precedes this destination entry.

     FORWARD: *.*.*.* .* * * ipam.smarts.com:v4:2002 -nosmtrapaddr gifted.yahoo.com:v6:2002