This problem related with the log level start options of snmpd
service.
On Debian based systems, start options configured through /etc/default/snmpd
file and it has following default settings:
SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -g snmp -I -smux,mteTrigger,mteTriggerConf -p /run/snmpd.pid'
With the above configuration, snmpd service sends all the logs including LOG_DEBUG to syslog.
You need to change minimum loglevel parameter as LOG_INFO to fix this problem.
To do this, change -Lsd
parts of the SNMPDOPTS
as -LS6d
:
$ sudo sed -i "s|-Lsd|-LS6d|" /etc/default/snmpd
If you want to change loglevel as LOG_ERROR and above, you can use -LS3d
.
Snmpd’s startup logging parameters a little complex. You may need to look at LOGGING OPTIONS section of man snmpcmd.