I am trying to log snmp traps to mysql db, but unfortunately without results. OS - Debian Net-SNMP v.5.7.3 MySQL 5.1 I am using snmptrapd and did the configuration from here
here is my snmptrapd.conf:
authCommunity log public
sqlMaxQueue 1
sqlSaveInterval 9
I did
./configure --with-defaults --with-mysql
as in the manual . Then
make
make install
Here is my ~/.my.cnf:
[snmptrapd]
user=snmp
password=******
host=localhost
my /default/snmpd:
#export MIBS=
#SNMPDRUN=yes
#SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -g snmp -I -smux -p /var/run/snmpd.pid'
TRAPDRUN=yes
TRAPDOPTS='-Lsd -p /var/run/snmptrapd.pid'
SNMPDCOMPAT=yes
I have exact DB schema as in the manual
I have success logging into syslog, but nothing in mysql. Even mysql log doesn't show anything. It's looks like snmptrapd doesnt reach MySQL
Can anyone give me idea what i am missing?
I found the solution of my problem. I have been changing
/etc/snmp/snmptrapd.conf
and mysql logging didnt worked. I just find that there is anothersnmptrapd.conf
in/usr/local/etc/snmp/snmptrapd.conf
that i fill with the configuration showed in my first post. So far it works!