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 matching criteria for traps and the forwarding destinations for matched traps. Valid syntax is as follows:

FORWARD<specific type> <<dest_opt> | <dest_entry>> \ [<<dest_opt> | <dest_entry>>...]

Where:

  1. <dest_entry> is: <host>:<port> | <host>:<port>:<community>

    <host> is one of the following:

    <host name>[:<ipVersion>]

    <fully qualified domain name>[:<ipVersion>]

    <IPv4 address>[:<ipVersion>]"["<IPv6 address>"]"

    <ipVersion> is: v4 | v6 | v4v6 | v6v4 or similar values with mixed case or uppercase letters.

    <port> is an integer

    <community> is a community string

  2. <dest_opt> is "-nosmtrapaddr" | "-usesmtrapaddr"

    dest_opt -nosmtrapaddr disables the addition of MIB variables representing the trap address type and trap address. dest_opt -usesmtrapaddr enables the addition of these MIBs. This is the default behavior. -nosmtrapaddr and -usesmtrapaddr apply to destination entries that occur after the option, until the end of the line or until a new option overrides the active option.

Examples are provided below:

FORWARD: 192.168.250.<32-120> .* 6 * asterix:5000 jupiter [3ffe:80c0:22c:109:214:4fff:fe39:a73d]:2002

Here, all specific traps received from network devices in the range from 192.168.230.32 to 192.168.230.120 will be sent to asterix port 5000, jupiter port 162 and 3ffe:80c0:22c:109:214:4fff:fe39:a73d port 2002.

FORWARD: * .* * * snake:9099:public1

All traps received from all network devices will be sent to host snake port 9099.

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