Administer > NNMi Incidents > Configure Incidents > Configuring Trap Logs

Configuring Trap Logs

NNMi provides the ability to log all incoming SNMP traps into a log file (either a text file or a CSV file). Traps are logged to the following location:

  • Windows: %NnmDataDir%\nnm\log
  • Linux: $NnmDataDir/nnm/log

Trap log files can be configured using the nnmtrapconfig.ovpl script. The following format choices are available:

  • CSV (default) – Traps are logged in the CSV format (trap.csv).
  • TXT – Traps are logged in the TXT format (trap.log).
  • BOTH – Traps are logged in both CSV and TXT (2 log files).
  • OFF – No traps are logged.

For example, to specify that traps get logged into BOTH modes, you would use the following command:

nnmtrapconfig.ovpl -setProp trapLoggingMode BOTH -persist

Note that the -persist argument causes all trap server properties to remain in effect even after the trap service is restarted. If you do not use the -persist argument, all trap server properties will be in effect only until the service is stopped.

Traps are written to a rolling file. After the log file size reaches the defined maximum limit (as defined using the nnmtrapconfig.ovpl script), the file is renamed to trap.<format>.old. Any existing file is replaced.

See the nnmtrapconfig.ovpl reference page, or the Linux manpage, for more information. See also Configure Trap Logging in the NNMi help.