Under normal working conditions, when SNMP Managers query SNMP agents (snmpd) on RHEL 6, several lines of information similar to the following are logged into syslog:

 May 27 17:39:14 MyLinuxHost snmpd[1521]: Connection from UDP: []:54907->[] 

As snmpd is typically queried frequently, your syslog (e.g. /var/log/messages) will be filled with several such informational lines as this can lead to “noise” and is truly not required.

SNMP Logging Levels are given below:

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

By default, SNMP on RHEL 6 has logging levels 0-6 enabled. The redundant information in the logs is logged at level 6. Given below are steps to disable these informational messages for SNMP on RHEL 6:

STEP 1:Modify the SNMP Logging Level

Edit /etc/init.d/snmpd and modify the OPTIONS variable to reflect logging levels 0-5 as shown below:

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

STEP 2:Restart the SNMP service

Restart the SNMP service for the changes to take effect:

 sudo service snmpd restart 
VN:F [1.9.22_1171]
Rating: +17 (from 23 votes)

Tagged with:

Filed under: Linux

Like this post? Subscribe to my RSS feed and get loads more!