We are here to help!

Find new ways to use Atera, Ask us anything.


Monitor Linux Servers Using SNMP

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


1. Install SNMPd agent on Ubuntu Server 17

Type the following command as root, then click Enter:


sudo apt-get update
sudo apt-get install snmp snmp-mibs-downloader

sudo apt-get update

sudo apt-get install snmpd

2. 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.


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

sudo nano /etc/snmp/snmp.conf

In this file, there are a few comments and a single un-commented line. To allow the manager to import the MIB files, we simply need to comment out the mibs :  line:
#mibs :


2.2 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.


Open the daemon’s configuration file with sudo privileges: sudo nano /etc/snmp/snmpd.conf

# 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



3. 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


To test the above configuration, create a new SNMP device and try to discover the following OID . 


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:


2. 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?
8 out of 17 found this helpful
Have more questions? Submit a request