How to Monitor Linux Machines with Observium
In our last article, we set up Observium for monitoring servers and network devices. This guide focus on adding Linux machines to the Observium tool for monitoring.
Setup Observium monitoring tool for your environment.
Switch to the root user.
sudo su -
### CentOS 7 / RHEL 7 ### yum -y install net-snmp ### Debian 9 / Ubuntu 16.04 ### apt-get -y install snmpd
Edit the SNMP configuration file.
### CentOS 7 / RHEL 7 ### vi /etc/snmp/snmpd.conf ### Debian 9 / Ubuntu 16.04 ### nano /etc/snmp/snmpd.conf
Update the snmpd.conf with the below details.
Below is the minimal SNMP configuration recommended by Observium. If you have custom SNMP configuration present on the client server, then just update the below lines with existing settings, otherwise, delete the snmpd.conf file and recreate it again with below content.
# Listen to all interface agentAddress udp:161 # Change "observium" to your preferred SNMP community string com2sec readonly default observium group MyROGroup v2c readonly view all included .1 80 access MyROGroup "" any noauth exact all none none # Update your location here syslocation [40.705311,-74.2581883] syslocation New York, United States syscontact ITzGeek Admin <[email protected]> # Distro Detection extend .126.96.36.199.4.1.2021.7890.1 distro /usr/bin/distro
Copy the distro script to get OS information on Observium.
cp /opt/observium/scripts/distro /usr/bin/distro chmod +x /usr/bin/distro
Restart SNMP service.
systemctl restart snmpd
Enable SNMP service on system boot.
systemctl enable snmpd
Ensure SNMP process listens on all network interface or on a particular interface which is accessible to Observium.
netstat -antup | grep -i 161
udp 0 0 0.0.0.0:161 0.0.0.0:* 2022/snmp
Allow SNMP through the firewall to let Observium collect usage metrics from Linux machines.
firewall-cmd --permanent --add-port=161/udp firewall-cmd --reload
ufw allow 161/udp ufw reload
Monitor Linux Machines with Observium
Login into Observium and go to Devices >> Add Device.
Enter Hostname, SNMP version (v2c – leave the default), port number (161), and community name on this page.
As recommended in Observium setup, we will add localhost (Observium server) as our first device.
Wait for few minutes to let Observium collects data of the newly added device.
Automated discovery of the newly added device happens every five minutes, and complete discovery of all devices happens every six hours.
Repeat same steps to add all your servers and network devices.
You can list all your devices by going to Devices >> All Devices.
Screenshot all devices:
Click on Host/Device Name to see detailed information of a particular Host/Device.
Click on Graphs (Devices >> All Devices >> Host/Device name >> Graphs) to see detailed statistics of all metrics like Running Processes, Users logged in, Context switches, CPU usage, Load averages, etc.
Click on the image to zoom.
To view the Health of all devices in single place. Go to Health >> Choose Memory or Processor or Storage.
Screenshot of Observium front page dashboard.
Observium is a great tool and has maximum capabilities for monitoring server and network devices. Don’t miss to explore all the possibilities of Observium.
Interested in Other Server Monitoring Tools
That’s all for now. We will meet in another article, soon.