Setup SNMP On A Linux Host

This article will cover the basic setup of SNMP on a Linux host. Typically I enable this service to monitor the performance of a Linux host using Cacti.

First we install the SNMP daemon and SNMP tools:
sudo apt-get install snmp snmpd
Next we take a backup of the default SNMP daemon configs:
sudo mv /etc/snmp/snmpd.conf  /etc/snmp/snmpd.conf.old

Then we create a new daemon config:
sudo nano /etc/snmp/snmpd.conf

In the config file add the following information:
rocommunity  public
syslocation  "Data Center Location"

Next we update the daemon to use this snmpd.conf file:
sudo nano /etc/default/snmpd

Replace the following line:
SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -I -smux -p /var/run/'

#SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -I -smux -p /var/run/'
SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -I -smux -p /var/run/ -c /etc/snmp/snmpd.conf'

Now restart the SNMP daemon to reload the settings:
sudo service snmpd restart

Basic SNMP V1 is now running. To test that SNMP is responding run the following command from the Linux host:
snmpwalk -v 1 -c public localhost


Popular posts from this blog

Monitoring Raspberry Pi Performance Using Cacti

Using NAGIOS to Check the Physical Memory Available on a Windows Host

Error 2738 Occurs When Installing An MSI Package