SDMConnector / TrapX no longer logs (file filter statement)
search cancel

SDMConnector / TrapX no longer logs (file filter statement)

book

Article ID: 186203

calendar_today

Updated On:

Products

CA Spectrum

Issue/Introduction


After upgrading the SDC/TrapX to 10.4.1 the file filter seems to have stopped working and it no longer
  logs incoming traps to the designated file.

The Configuration is as follows

/opt/CA/SDMConnector/trapX.config
filter * * * * * * file /opt/logs/all_traps.log


 
 
 

Environment

Release : 10.4.1, 21.2, 22.2

Component : Spectrum Core / SpectroSERVER

Cause


Later versions of  SDC/TrapX now require an additional token after the file name

filter * * * * * * file /opt/logs/all_traps.log *

Resolution


Updated the syntax of the filter command being used in the trapX.config file to
   include the extra token at the end. In this case a wildcard was used

/opt/CA/SDMConnector/trapX.config
filter * * * * * * file /opt/logs/all_traps.log *

Additional Information

Snippet from the trapX_sample.config file


# 'file' action:
# This action logs the trap to a file in a human-readable format.  The
# log-file option is the name of the file to log the trap to.
# max-file-size specifies the maximum size that the file can grow to, in
# kilobytes.  When the <log-file> exceeds this size, it is renamed to
# <log-file>.bak, and a new <log-file> is created.  If <log-file>.bak
# already exists when the switchover occurs, it is overwritten.  If
# max-file-size is unspecified or set to 0, then the log file will grow
# indefinitely. the file option is only for V1 trap.
# Format:
#    file log-file [max-file-size] *
# file example:
# filter * * * * * * file /tmp/traps.log * 256 (256 represent file size which is optional)
# filter * * * * * * file c:\temp\traps.log *
# filter * * * * * * file /temp/trapX.txt *
# filter * * * * * * file /temp/trapX.txt "AND[1.3.6.1.4.1.9.2.2.1.1.20.1:Equals:Link Down Trap]" 10
#