Install SNMP and Configure Community String in Ubuntu
We have to regularly monitor server resources e.g. CPU, RAM, Storage, Network Bandwidth Utilization as a day-to-day activity. By monitoring the resources, we may find out the exact cause of any incident that might occur due to full resource utilization. It can guide us to increase the resources as well if require.
We are
currently using Observium and Cacti to monitor resource utilization. In order
to connect the servers with the observium/Cacti, we have to configure SNMPD in
the server.
You
may follow below guideline to install it in Ubuntu servers.
Test
Environment: Ubuntu 16.04 LTS and Ubuntu 18.04 LTS
Step 1: Install SNMPD.
root@mail:~#
apt-get install snmpd
Step 2: Rename the existing snmpd.conf
file and create a new one.
root@mail:~#mv
/etc/snmp/snmpd.conf
/etc/snmp/snmpd.conf.ori
root@mail:~#
touch /etc/snmp/snmpd.conf
Step 3: Configure the SNMP community
string.
root@mail:~#
vim /etc/snmp/snmpd.conf
rocommunity
mystring@322
syslocation
"Observium Server"
syscontact
afsher@xyz.com
Step 4: Comment the existing line
start with SNMPDOPTS and add the below line in the default file of snmpd.
root@mail:~# vim /etc/default/snmpd
#SNMPDOPTS='-Lsd
-Lf /dev/null -u snmp -g snmp -I -smux,mteTrigger,mteTriggerConf -p /run/snmpd.pid'
SNMPDOPTS='-Lsd
-Lf /dev/null -u snmp -I -smux -p /var/run/snmpd.pid -c /etc/snmp/snmpd.conf'
Step 5: Restart snmpd service.
root@mail:~#
/etc/init.d/snmpd restart
Comments
Post a Comment