Versions Compared

Key

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

...

Step #1 - Configure snmptrapd to forward traps to rsyslog

Edit /etc/sysconfig/snmptrapd

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 2' 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 -Ls 2 -p /var/run/snmptrapd.pid -m ALL -M /usr/local/nmis8/mibs/traps"

Verify /etc/snmp/snmptrapd.conf

Verify there is not reference to a traphandle in /etc/snmp/snmptrapd.conf

Step #2 - Configure rsyslog to route traps into a specified log file

...

Code Block
title/etc/rsyslog.conf
 *.info;mail.none;authpriv.none;cron.none;local2.none                /var/log/messages

 

...