Monday, December 19, 2011

Preventing unnecessary snmpd logging in /var/log/messages

With the default config, snmpd will fill up your /var/log/messages log with unnecessary info lines. To prevent this, you can configure snmpd to log only warning and higher level log lines. In order to do so,

1- Open the below file bia vi
vi /etc/rc.d/init.d/snmpd

2- Change this line :
OPTIONS="-Lsd -Lf /dev/null -p /var/run/snmpd.pid -a"

with this line
OPTIONS="-LS 0-4 d -Lf /dev/null -p /var/run/snmpd.pid -a"

3-Restart snmpd
service snmpd restart


No comments: