How can catrapd.exe ignore SNMP traps or send them - translated or not - to the console log?

Document ID : KB000055353
Last Modified Date : 14/02/2018
Show Technical Document Details

The catrapd.exe is either started manually (CATRAPD) or automatically when Unicenter is started.
Automatic starting is controlled by the caugui settings in

> Client Preferences > Component Activation Flags > SNMP Trap Server Activated
cautenv variable: CAIACTTRAP
YES is activated; NO is not activated.

Manual setting: cautenv setlocal CAIACTTRAP YES

Recycle Unicenter after changing this setting with:
unicntrl stop all
unicntrl start all
or stop/start the CA-Unicenter service.

Traps can be translated to more meaningful messages in the conlog by the catrapd.exe using (pre)loaded traps or MIBs in the trap database (CAITRPDB).
The trpcntrl (originally ANO; standard in NSM 11) can be used to load/modify traps/ MIBs.

Test catrapd for proper working by sending a test msg to the conlog like:

catrap <localmachinename> "" "" 6 1 1 1.3.6.1.4.1.791.1.4 octetstring "hello world"

Check the conlog for the message to appear in it. If not, check above settings.

The catrapd.exe is configured through c:\NSM\CAIUSER\CATRPD.CFG file (pre NSM 11.x)
Or c:\Program Files\CA\SharedComponents\CCS\WVEM\CAIUSER\CATRPD.CFG file (NSM 11.x)
(or from the user defined path if default has been changed)

CATRAPD.CFG

# This file contains masks of Enterprise OIDs to be excluded by CATRAPD daemon
# All SNMP traps received by CATRAPD and match ANY 'host:community:generic:specific:OID' string
# with action 'ignore', will NOT be reported to CA-Unicenter Event Management
#
# Format: host:community:generic:specific:OID  action # comments
# Where: host can be an IP address: 198.222.231.1, subnet: 198.222, node name: ranger, or name mask: ran*
# Cu
# AgentWorks internal OIDs are listed
#
#
# OID    Action    Comments
#===============================================#=========================
#
*:*:*:*:1.3.6.1.4.1.76.1 ignore  # AgentFactory Kernel 
...

If the following line is added:

# new SQL a2 agent
*:*:*:*:1.3.6.1.4.1.791.2.10.2.44 ignore # SQL A2 agent (caisqla2)

then the traps from the SQL A2 agent are ignored by the CA trap daemon and not sent to the conlog.

See the config file itself for more details.

NB: With NSM 11, "allow" can also be coded in the .cfg file:

#*:*:*:*:1.3.6.1.4.1.791.* allow # Sample allow, allows all CA enterprise specific traps

(remove # to activate the above line)

In NSM 11, more SNMP variables controlling the working of catrapd.exe are added to the caugui settings in

> Client preferences > Event management tab

See the online help documentation for more information about these variables.

SNMP Trap daemon config file

CA_TRAPD_CONFIG
Specifies the name of the configuration file that tells the daemon which
SNMP TRAPS
to ignore or allow.
Default: %CAILOCL0000%\catrapd.cfg

SNMP - Format traps using provided tables?

CA_TRAPD_XLATE

This option controls whether the feature "Automatic formatting of SNMP traps" is enabled.
When you take advantage of this feature, the most important information from a trap will be formatted to a user-friendly language. Predefined formatting is provided for thousands of traps from many companies.

If you are going to enable this feature, make sure the SNMP Trap Service Activated option is also set to YES.

If you change either of these options, restart the CA SNMP Trap Daemon (CATRAPD).

Values: YES or NO
Default: NO

Note: This feature is not available on an Event Agent machine.

SNMP - Display only those traps designated as ?allow' in the catrapd config file?

CA_TRAPD_FILTER_BY_ALLOW

This option filters out all traps except for those configured in catrapd.cfg as allow.
Recycle catrapd for the new setting to take effect.
YES - Displays traps whose header data meet the allow criteria in the catrapd.cfg file.
NO - Displays all traps regardless of the individual allow configurations unless explicitly set to ignore.
Using the following example catrapd.cfg settings, if this option is set to YES, all CA enterprise traps will be allowed except the Sybase agent, which will still be ignored per the configuration. If this option is set to NO, all traps will be allowed regardless of the individual allow configurations unless explicitly set to ignore, like the Sybase Agent example configuration.

For example:
*:*:*:*:1.3.6.1.4.1.791.3.9.4 ignore        # Sybase Agent 
*:*:*:*:1.3.6.1.4.1.791.*     allow          # Allow only CA enterprise
traps
Values:  YES or NO
Default: NO

SNMP - Display trap header in formatted trap messages

CA_TRAPD_DISPLAY_XLATE_HEADER

When trap translation is enabled (SNMP - Format traps using provided tables set to YES), this option controls whether a header is displayed.
The header contains data about the origin of the trap. The header data displayed using this option is the same as the header displayed in not translated trap messages, but the data can be displayed either before or after the translated message. Recycle catrapd for the new setting to take effect.
NO - Does not display header.
END - Displays header at the end of the message.
The header may have less impact on message actions when displayed at the end.

BEG - Displays header before the message.

Default: NO

SNMP - Enable SNMP version 3 support

CA_TRAPD_SNMPV3
This option controls the support of SNMP version 3 traps.

YES indicates a request to process version 1, version 2c, and version 3 traps.
NO indicates a request to process only version 1 and version 2c traps.
Values: YES or NO

Default: NO

SNMP trap database name

CA_TRAPD_DBNAME

This option identifies the SNMP trap database.
Default: MDB (NSM 11.x)