Home Stop snmpd spamming messages in centos 7
Post
Cancel

Stop snmpd spamming messages in centos 7

SNMPD spamming /var/log/messages is a pet hate of mine. It causes so much rubbish to be sat in the logs. I had a hard time looking for how to do this on centos 7. I eventually managed to work it so im adding it here as i wasnt able to find the relevant resource online.

CD into the relevant directory

1
[root@home-server ~]# cd /etc/systemd/system/multi-user.target.wants
1
[root@home-server multi-user.target.wants]# vi snmpd.service

Change the Environment variable as so:

1
Environment=OPTIONS="-LS0-5d"

Close vi

Restart the service

1
[root@home-server multi-user.target.wants]# systemctl restart snmpd.service

Say good bye to all these messages!

1
Apr 19 03:25:41 home-server snmpd[980]: Connection from UDP: [192.168.*.*]:39604->[192.168.*.*]:161
This post is licensed under CC BY 4.0 by the author.