Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Below is an example of configuring snmptrapd to send traps to rsyslog.  The '-Ls' flag tells snmptrapd to send logging output to syslog.  Using '-Ls 2Ls2' specifies that snmptrapd will send it with the local2 facility value.  The facility value is what rsyslog keys on for routing decisions.  Please review the snmptrapd and snmpcmd man pages.

Code Block
title/etc/sysconfig/snmptrapd
 OPTIONS="-n -LsLs2 2 -p /var/run/snmptrapd.pid -m ALL -M /usr/local/nmis8/mibs/traps"

...

We need to tell opEvents to process the newly created snmptrap.log file.  This is done in /usr/local/omk/conf/opCommon.nmis.  Be careful with this file; in reality it is a perl hash, any syntax error will render the OMK server dead.  After modifying this file check it for syntax errors with the following command 'perl -c /usr/local/omk/conf/opCommon.nmis'.  If you are not scared you should be (smile) (smile)

Something like the following example needs to be added to the opevents section of opCommon.nmis. 

...

  • Use tcpdump to observe snmptraps being recieved by the server
  • Use the ps command to ensure snmptrapd, rsyslog, omkd, and opeventsd are running with the proper options
  • Tail /usr/local/nmis/logs/snmptraps.log file
  • Tail /usr/local/omk/log/opEvents.log
  • Via the GUI; check opEvents views-> raw logs
  • Via the GUI; check opEvents views -> events

...