This is a detailed guide on how monitor an Ubuntu Server using SNMPv2 and Observium.
1. Install SNMP
1.1 Install snmp and snmp-mibs-downloader
apt-get install snmp snmp-mibs-downloader
1.2 Install snmpd
apt-get install snmpd
2. Edit /etc/snmp/snmp.conf
Comment out the mibs: line as per below
# As the snmp packages come without MIB files due to license reasons, loading # of MIBs is disabled by default. If you added the MIBs you can reenable # loading them by commenting out the following line. #mibs :
3. Edit /etc/snmp/snmpd.conf
3.1 Comment and uncomment (remove and the add #) for the following:
# Listen for connections from the local system only #agentAddress udp:127.0.0.1:161 # Listen for connections on all interfaces (both IPv4 *and* IPv6) agentAddress udp:161,udp6:[::1]:161
This means that the server will listen for external connections on all interfaces on port 161. “agentAddress udp:161,udp6:[::1]:16”
3.2 Uncomment the rocommunity, change the community string and add the IP or subnet of the Observium Server.
In this scenario the community string is SNMPString! and the server is 10.0.125.14 – I have added 10.0.125.0/24 to cover the subnet that the server resides in.
#rocommunity Public default -V all # rocommunity6 is for IPv6 #rocommunity6 Public default -V all # Full access from an example$ # Adjust this network addr$ # settings, change the com$ # and check the 'agentAddr$ rocommunity SNMPString! 10.0.125.0/24
3.3 Restart snmpd
service snmpd restart
4. Add SNMP string and SNMP agent (Fortigate IP) to Observium
Under devices click new device. Add the end-point IP address of the Server and the community string.
If all is well you should see confirmation that the device has been added successfully.
6.1 Make sure all settings match as per above IP addresses and Community strings.
6.2 Ensure traffic is being sent and reaching it’s destination using tcpdump.
root@Syslog:~# tcpdump -i eth0 -port 161
6.3 Ensure that the traffic is allowed by the local firewall.
If you are new to the world of Linux, an avid Linux enthusiast or a student why not try our 0.99p per month Linux VPS.
Simply click on the screen shot below to find out more or navigate to https://piggybank.cloud
Thank you for reading and please feel free to leave any feedback.