서버관리2013. 12. 9. 19:04
300x250

A 서버 : 센토스 5.x 에서 snmp 서비스를 돌리고, 

B 서버 : mrtg 로 A 서버를 모니터링.. 하는 상황.. 


위와 같은 상황에서 A 서버의 /var/log/messages 에

.... snmpd[1521]: Connection from UDP: [xxx.xxx.xxx.xxx]:54907

이런 메시지가 5분 간격으로 주기적으로 쌓여서 로그가 넘쳐나는 경우.


로그의 양을 줄여 보자. 


우선, 원인은 snmp 의 옵션으로 로그 레벨이 너무 낮게 설정되어 있어서 모든 로그가 다 남는 것.. 

로그 레벨을 변경하여 로그를 안남게 해 보자. 


/etc/sysconfig/snmpd.options  파일에 OPTIONS 를 설정해 주자.

OPTIONS="-LS0-5d -Lf /dev/null -p /var/run/snmpd.pid -a"


그리고, snmpd 재시작
# service snmpd restart

5분마다 쌓이는 로그가 없어졌다. 

참고로 로그레벨은
http://cybergav.in/2012/05/27/how-to-disable-redundant-snmp-logging-connection-information-in-rhel-6/






LOG LEVEL DESCRIPTION
0 Emergencies – System is unusable
1 Alerts – Immediate action needed
2 Critical – Critical conditions
3 Errors – Error conditions
4 Warnings – Warning conditions
5 Notifications – Informational messages
6 Informational – Normal but significant conditions
7 Debugging – Debugging messages
- See more at: http://cybergav.in/2012/05/27/how-to-disable-redundant-snmp-logging-connection-information-in-rhel-6/#sthash.A50TrTP8.dpuf


LOG LEVEL DESCRIPTION
0 Emergencies – System is unusable
1 Alerts – Immediate action needed
2 Critical – Critical conditions
3 Errors – Error conditions
4 Warnings – Warning conditions
5 Notifications – Informational messages
6 Informational – Normal but significant conditions
7 Debugging – Debugging messages
- See more at: http://cybergav.in/2012/05/27/how-to-disable-redundant-snmp-logging-connection-information-in-rhel-6/#sthash.A50TrTP8.dpuf


LOG LEVEL DESCRIPTION
0 Emergencies – System is unusable
1 Alerts – Immediate action needed
2 Critical – Critical conditions
3 Errors – Error conditions
4 Warnings – Warning conditions
5 Notifications – Informational messages
6 Informational – Normal but significant conditions
7 Debugging – Debugging messages
- See more at: http://cybergav.in/2012/05/27/how-to-disable-redundant-snmp-logging-connection-information-in-rhel-6/#sthash.A50TrTP8.dpuf


LOG LEVEL DESCRIPTION
0 Emergencies – System is unusable
1 Alerts – Immediate action needed
2 Critical – Critical conditions
3 Errors – Error conditions
4 Warnings – Warning conditions
5 Notifications – Informational messages
6 Informational – Normal but significant conditions
7 Debugging – Debugging messages
- See more at: http://cybergav.in/2012/05/27/how-to-disable-redundant-snmp-logging-connection-information-in-rhel-6/#sthash.A50TrTP8.dpuf



LOG LEVEL DESCRIPTION 0 Emergencies – System is unusable 1 Alerts – Immediate action needed 2 Critical – Critical conditions 3 Errors – Error conditions 4 Warnings – Warning conditions 5 Notifications – Informational messages 6 Informational – Normal but significant conditions 7 Debugging – Debugging messages - See more at: http://cybergav.in/2012/05/27/how-to-disable-redundant-snmp-logging-connection-information-in-rhel-6/#sthash.A50TrTP8.dpuf

LOG LEVEL DESCRIPTION 0 Emergencies – System is unusable 1 Alerts – Immediate action needed 2 Critical – Critical conditions 3 Errors – Error conditions 4 Warnings – Warning conditions 5 Notifications – Informational messages 6 Informational – Normal but significant conditions 7 Debugging – Debugging messages - See more at: http://cybergav.in/2012/05/27/how-to-disable-redundant-snmp-logging-connection-information-in-rhel-6/#sthash.A50TrTP8.dpuf
LOG LEVEL DESCRIPTION 0 Emergencies – System is unusable 1 Alerts – Immediate action needed 2 Critical – Critical conditions 3 Errors – Error conditions 4 Warnings – Warning conditions 5 Notifications – Informational messages 6 Informational – Normal but significant conditions 7 Debugging – Debugging messages - See more at: http://cybergav.in/2012/05/27/how-to-disable-redu
ndant-snmp-logging-connection-information-in-rhel-6/#sthash.A50TrTP8.dpuf


300x250
Posted by 마스타