How to reduce SNMP logging on a Linux server

Background

SNMP is a wonderful tool but the moment you switch it on a Linux server you might find countless messages in your log file such as the following:

tail -f /var/log/messages

Oct 21 11:18:52 server snmpd[6404]: Connection from UDP: [a.b.c.d]:58212->[w.x.y.z]:161
Oct 21 11:18:56 server snmpd[6404]: Connection from UDP: [a.b.c.d]:65111->[w.x.y.z]:161
Oct 21 11:18:56 server snmpd[6404]: Connection from UDP: [a.b.c.d]:65112->[w.x.y.z]:161

Although these messages are completely harmless you probably want to suppress them so that you can focus on more important information in the logs.

How to reduce SNMP logging on a Linux Server

There are various remedies for turning off SNMP logging, some more complex than others. The one we found that works best is to add `dontLogTCPWrappersConnects yes` to your SNMPD configuration.

cat /etc/snmp/snmpd.conf

dontLogTCPWrappersConnects yes

Then restart snmp with service snmpd restart

For more remedies, see the reference below:

https://serverfault.com/questions/310640/reduce-snmpd-logging-verbosity

Share this article

Share on facebook
Share on twitter
Share on linkedin

Leave a Reply

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

Scroll to Top