SNMP Configuration for linux hosts

Configuration

Move existing /etc/snmp/snmpd.conf configuration file to /etc/snmp/snmpd.conf.orig then
mv /etc/snmp/snmpd.conf  /etc/snmp/snmpd.conf.org
Create a new /etc/snmp/snmpd.conf file:
rocommunity  public
syslocation  “Ashburn colo”
syscontact  ops@company.com
Make snmpd use the newly created file and make it listen to all interfaces:
Edit /etc/default/snmpd
Change from:
# snmpd options (use syslog, close stdin/out/err).
SNMPDOPTS=’-Lsd -Lf /dev/null -u snmp -I -smux -p /var/run/snmpd.pid 127.0.0.1′
To:
# snmpd options (use syslog, close stdin/out/err).
#SNMPDOPTS=’-Lsd -Lf /dev/null -u snmp -I -smux -p /var/run/snmpd.pid 127.0.0.1′
SNMPDOPTS=’-Lsd -Lf /dev/null -u snmp -I -smux -p /var/run/snmpd.pid -c /etc/snmp/snmpd.conf’
and restart snmpd
/etc/init.d/snmpd restart