We are here to help!

Find new ways to use Atera, Ask us anything.


How To Monitor Linux Servers Using SNMP

In this article, we will show you how to install and configure SNMP in the remote server and how to add the host to Atera.

Install SNMPd agent on Ubuntu Server 14.04/14.10

Type the following command as root then press Enter:

apt-get update && apt-get install snmpd

SNMPd Configuration
The snmpd daemon must be configured to work with Atera. The configuration file is located at “/etc/snmp/snmpd.conf“. Make sure you are editing the snmpd.conf file and not the snmp.conf file.

To get started, open the daemon’s configuration file with sudo privileges:

sudo nano /etc/snmp/snmpd.conf

Currently, the SNMPd is set to only allow connections originating from the local computer. We need to comment out the current line, and uncomment the line underneath to allow all connections

# Listen for connections from the local system only
#agentAddress udp:
# Listen for connections on all interfaces (both IPv4 *and* IPv6)
agentAddress udp:161,udp6:[::1]:161


Add View

view   all         included   .1                80


Access Control - Change the following line:


rocommunity public  default    -V systemonly


rocommunity test1252serc default    -V all

The snmp community is test1252serc.



You can add the physical location of your server and a contact email address. These may be helpful for distinguishing machines if you are monitoring a large number of cloud servers.

sysLocation Your System Location
sysContact contact@email.com

After you are done with your modifications, save the file, exit and restart the snmpd service.

$sudo service snmpd restart


Install and Configure SNMP on Centos

 Install SNMP and SNMP Utilities

Installing SNMP and some optional SNMP utilities is as simple as running one command:

yum -y install net-snmp net-snmp-utils

Add a Basic Configuration for SNMP

Now, let’s take the default SNMP configuration file, /etc/snmp/snmpd.conf and move it to an alternate location,/etc/snmp/snmpd.conf.orig.

  1. Type the command below and execute.

mv /etc/snmp/snmpd.conf /etc/snmp/snmpd.conf.orig

And now we’ll create a new /etc/snmp/snmpd.conf:

vim /etc/snmp/snmpd.conf

    2. Insert the following text into the new /etc/snmp/snmpd.conf


# Map 'tes90w90t' community to the 'AllUser'
# sec.name source community
com2sec AllUser default tes90w90t
# Map 'ConfigUser' to 'ConfigGroup' for SNMP Version 2c
# Map 'AllUser' to 'AllGroup' for SNMP Version 2c
# sec.model sec.name
group AllGroup v2c AllUser
# Define 'SystemView', which includes everything under . (or .
# Define 'AllView', which includes everything under .1
# incl/excl subtree
view SystemView included .
view SystemView included .
view AllView included .1
# Give 'ConfigGroup' read access to objects in the view 'SystemView'
# Give 'AllGroup' read access to objects in the view 'AllView'
# context model level prefix read write notify
access AllGroup "" any noauth exact AllView none none


The above text is noted with basic information on the function of each configuration line. In short, we’re creating these scenarios for polling.

AllUser is assigned to AllGroup and may only use SNMP security model 2c.

AllGroup can use the AllView.

AllView is assigned to the entire OID tree, and all of this is referenced in an SNMP poll by the secret and unique community string tes90w90t.

Exit vim, and restart the SNMP service to reload the new configuration file:

  1. Enter the command below and execute.

service snmpd restart

Configure SNMP to start when the server boots:

  1. Enter the command below and execute.

chkconfig snmpd on



Test the SNMP Configuration

If you have a firewall configured, ensure that you have UDP port 161 open to your SNMP lookup server.

On your SNMP lookup server, you can do the following to perform a quick SNMP test to ensure that it’s working.

  • Enter the command below and execute.

snmpwalk -v 2c -c tes90w90wer -O e

The output should display as below:

SNMPv2-MIB::sysDescr.0 = STRING: Linux 2.6.18-194.11.4.el5xen #1 SMP Tue Sep 21 05:40:24 EDT 201 0 x86_64 SNMPv2-MIB::sysObjectID.0 = OID: NET-SNMP-MIB::netSnmpAgentOIDs.10 DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (242211) 0:40:22.11 SNMPv2-MIB::sysContact.0 = STRING: root@localhost SNMPv2-MIB::sysName.0 = STRING: SNMPv2-MIB::sysLocation.0 = STRING: Unknown SNMPv2-MIB::sysORLastChange.0 = Timeticks: (2) 0:00:00.02 SNMPv2-MIB::sysORID.1 = OID: SNMPv2-MIB::snmpMIB SNMPv2-MIB::sysORID.2 = OID: TCP-MIB::tcpMIB SNMPv2-MIB::sysORID.3 = OID: IP-MIB::ip SNMPv2-MIB::sysORID.4 = OID: UDP-MIB::udpMIB SNMPv2-MIB::sysORID.5 = OID: SNMP-VIEW-BASED-ACM-MIB::vacmBasicGroup SNMPv2-MIB::sysORID.6 = OID: SNMP-FRAMEWORK-MIB::snmpFrameworkMIBCompliance SNMPv2-MIB::sysORID.7 = OID: SNMP-MPD-MIB::snmpMPDCompliance SNMPv2-MIB::sysORID.8 = OID: SNMP-USER-BASED-SM-MIB::usmMIBCompliance


Linux SNMP OIDs for CPU,Memory and Disk Statistics

CPU Statistics

1 minute Load: .
5 minute Load: .
15 minute Load: .

percentage of user CPU time: .
raw user cpu time: .
percentages of system CPU time: .
raw system cpu time: .
percentages of idle CPU time: .
raw idle cpu time: .
raw nice cpu time: .

Memory Statistics

Total Swap Size: .
Available Swap Space: .
Total RAM in machine: .
Total RAM used: .
Total RAM Free: .
Total RAM Shared: .
Total RAM Buffered: .
Total Cached Memory: .

Disk Statistics

The snmpd.conf needs to be edited. Add the following (assuming a machine with a single ‘/' partition):

disk / 100000 (or)

includeAllDisks 10% for all partitions and disks

The OIDs are as follows

Path where the disk is mounted: .
Path of the device for the partition: .
Total size of the disk/partion (kBytes): .
Available space on the disk: .
Used space on the disk: .
Percentage of space used on disk: .
Percentage of inodes used on disk: .

System Uptime: .

To learn how to create an SNMP device, click on the following link



Was this article helpful?
0 out of 1 found this helpful
Have more questions? Submit a request