segunda-feira, 28 de março de 2011

How to disable centos net-snmp log





The centos snmp client logs all the snmp requisitions that the system receives.
Many times this is incovenient because that dirty the /var/log/messages with these kind of logs:
Mar 28 12:44:57 server1 snmpd[16808]: Connection from UDP: [172.25.3.53]:47306
Mar 28 12:44:57 server1 snmpd[16808]: Received SNMP packet(s) from UDP: [172.25.3.53]:47306
Mar 28 12:44:57 server1 snmpd[16808]: Connection from UDP: [172.25.3.53]:47306

To disable it, edit the "/etc/sysconfig/snmpd.options" file and add the following line:
.
.
.
OPTIONS="-Lf /dev/null -p /var/run/snmpd.pid -a"
.
.
.

Note: this file can already have the line 'OPTIONS="-Lsd -Lf /dev/null -p /var/run/snmpd.pid -a"', note that the -Lsd option must be removed because it is what enables the log.

Restart the snmpd service:
/etc/init.d/snmpd restart


SORRY MY ENGLISH, I'M LEARNING YET!

Nenhum comentário: