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!
Destivar log do net-snmp do centos
O cliente snmp do centos loga todas as requisições de snmp que recebe.
Muitas vezes isso é incoveniente pois suja o /var/log/messages com logs do seguinte tipo:
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
Para desativa-lo, edite o arquivo "/etc/sysconfig/snmpd.options" e adicione a linha abaixo:
.
.
.
OPTIONS="-Lf /dev/null -p /var/run/snmpd.pid -a"
.
.
.
Nota: nesse aquivo pode já existir a linha 'OPTIONS="-Lsd -Lf /dev/null -p /var/run/snmpd.pid -a"', note que a opção -Lsd deve ser retirada, pois é ela que habilita o log.
Reinicie o serviço snmpd:
/etc/init.d/snmpd restart
Assinar:
Postagens (Atom)