Ubuntu 9.04 Snmpd filling up /var/log/messages and sending excessive syslog

I recently upgraded to Ubuntu 9.04 and found that snmpd was going overboard with the amount of syslog messages it was sending to my syslog server.

Example:

May 22 12:49:55 Server snmpd[4386]: Connection from UDP: [10.1.1.1]:58410
May 22 12:49:55 Server snmpd[4386]: Connection from UDP: [10.1.1.1]:56401
May 22 12:49:55 Server snmpd[4386]: Connection from UDP: [10.1.1.1]:51123
May 22 12:49:55 Server snmpd[4386]: Connection from UDP: [10.1.1.1]:49181
May 22 12:49:55 Server snmpd[4386]: Connection from UDP: [10.1.1.1]:42994
May 22 12:49:55 Server snmpd[4386]: Connection from UDP: [10.1.1.1]:46429
May 22 12:49:55 Server snmpd[4386]: Connection from UDP: [10.1.1.1]:60154

The fix was to modify the following line in my /etc/default/snmpd file:

Before:
SNMPDOPTS=’-Lsd -Lf /dev/null -u snmp -I -smux -p /var/run/snmpd.pid 0.0.0.0′

After:
SNMPDOPTS=’-LS4d -Lf /dev/null -u snmp -I -smux -p /var/run/snmpd.pid 0.0.0.0′

Once this is done restart snmpd: sudo /etc/init.d/snmpd restart

Enjoy!

Update:

I checked on my Ubuntu 8.04 server (64bit) and saw that I was suffering from the same snmpd logging issue. I saw that this box was too running snmpd v5.4.1. I tried the same fix detailed above but it did not take and snmpd would complain about the options used. I was able to resolve the issue with the followng line in my /etc/default/snmpd :

SNMPDOPTS=’-LS 0-4 d -Lf /dev/null -u snmp -I -smux -p /var/run/snmpd.pid 0.0.0.0′

1 thought on “Ubuntu 9.04 Snmpd filling up /var/log/messages and sending excessive syslog

  1. Just what I was looking for. Thanks!
    For others: check man snmpcmd logging options for more info.

Leave a Reply

Your email address will not be published. Required fields are marked *