Versions Compared

Key

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

...

sudo snmptrap -v 2c  -c public 127.0.0.1 80000 1.3.6.1.4.1.4818 1.3.6.1.4.1.4818.1 s Event_Gladston


Step-by-Step How to Configure the SNMPTRAPS to Forward Traps to Sylog


OBSERVATION: The "Ls" option will configure snmptrapd to send logs to syslog. So, "Ls2" specifically configures snmptrapd to send logs from the local2 facility. The facility is a value that indicates which process on the device generated the message. 

STEP 1


RHEL/CENTOS Linux 

cd /etc/sysconfig/

...

TRAPDOPTS='-n -OQ -Ls2 -p /var/run/snmptrapd.pid -m ALL -M /usr/local/nmis9/mibs/traps'
[Service]
ExecStart=
ExecStart=/usr/sbin/snmptrapd -n -OQ -Ls2 -p /var/run/snmptrapd.pid -m ALL -M /usr/local/nmis9/mibs/traps


STEP 2


cd /etc

vim rsyslog.conf

*.info;mail.none;authpriv.none;cron.none;local2.none    /var/log/messages


STEP 3