Would you like to learn how to install the Ubuntu SNMP Service? In this tutorial, we are going to show you how to install and configure an SNMP server on Ubuntu Linux version 17.

Hardware List:

The following section presents the list of equipment used to create this Ubuntu Linux tutorial.

Every piece of hardware listed above can be found at Amazon website.

Ubuntu Playlist:

On this page, we offer quick access to a list of videos related to Ubuntu Linux.

Don't forget to subscribe to our youtube channel named FKIT.

Ubuntu Related Tutorial:

On this page, we offer quick access to a list of tutorials related to Ubuntu linux.

Tutorial - Ubuntu SNMP Server

On the Linux console, use the following commands to install the required services.

# apt-get update
# apt-get install snmpd snmp

Now, you should find the location of the snmpd.conf file on your system.

After finding, you need to edit the snmpd.conf file.

# updatedb
# locate snmpd.conf

# vi /etc/snmp/snmpd.conf

Here is the original file, before our configuration and without the comments.

agentAddress udp:127.0.0.1:161
view systemonly included .1.3.6.1.2.1.1
view systemonly included .1.3.6.1.2.1.25.1
rocommunity public default -V systemonly
rocommunity6 public default -V systemonly
rouser authOnlyUser
sysLocation Sitting on the Dock of the Bay
sysContact Me <me@example.org>
sysServices 72
proc mountd
proc ntalkd 4
proc sendmail 10 1
disk / 10000
disk /var 5%
includeAllDisks 10%
load 12 10 5
trapsink localhost public
iquerySecName internalUser
rouser internalUser
defaultMonitors yes
linkUpDownNotifications yes
extend test1 /bin/echo Hello, world!
extend-sh test2 echo Hello, world! ; echo Hi there ; exit 35
master agentx

Here is the new file with our configuration.

rocommunity GokuBlack
syslocation Universe10 - IT Room
sysContact Zamasu <zamasu@dbsuper.com>;

The GokuBlack Community has read-only permission on the Ubuntu server.

The contact person responsible for this Linux was configured as Zamasu.

The location of the equipment was configured as the IT Room of Universe 10.

You should also restart SNMP manually and verify the service status.

# service snmpd stop
# service snmpd start
# service snmpd status

Here is an example of the SNMP service status output

● snmpd.service - LSB: SNMP agents
Loaded: loaded (/etc/init.d/snmpd; bad; vendor preset: enabled)
Active: active (running) since Wed 2018-04-25 04:04:49 UTC; 55s ago

You have successfully installed the Ubuntu SNMP service.

You have successfully configured the Ubuntu SNMP service.

To test your SNMP configuration, use the following commands.

# snmpwalk -v2c -c GokuBlack 127.0.0.1

Here is a small sample of the SNMPWALK output.

iso.3.6.1.2.1.1.1.0 = STRING: "Linux Ubuntu SMP Mon Feb 12 23:05:58 UTC 2018 x86_64"
iso.3.6.1.2.1.1.2.0 = OID: iso.3.6.1.4.1.8072.3.2.10
iso.3.6.1.2.1.1.3.0 = Timeticks: (32633) 0:05:26.33
iso.3.6.1.2.1.1.4.0 = STRING: "Zamasu <zamasu@dbsuper.com>;"
iso.3.6.1.2.1.1.5.0 = STRING: "ip-172-31-32-222"
iso.3.6.1.2.1.1.6.0 = STRING: "Universe10 - IT Room"
iso.3.6.1.2.1.1.8.0 = Timeticks: (0) 0:00:00.00