How to Monitor Linux Machines with Observium

0

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.

Prerequisites

Setup Observium monitoring tool for your environment.

READ: Install Observium on CentOS 7 / Ubuntu 16.04

Here, we will install and configure SNMP on the client servers (Linux machines), and then will configure Observium to collect data from clients via SNMP protocol.

Install SNMP

Switch to the root user.

su -

OR

sudo su -

Use the YUM command on CentOS / RHEL and apt command on Debian / Ubuntu to install SNMP package.

### CentOS 7 / RHEL 7 ###

yum -y install net-snmp

### Debian 9 / Ubuntu 16.04 ###

apt-get -y install snmpd

Configure SNMP

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 <admin@itzgeek.local>

# Distro Detection

extend .1.3.6.1.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

Output:

udp        0      0 0.0.0.0:161             0.0.0.0:*                           2022/snmp

Firewall

Allow SNMP through the firewall to let Observium collect usage metrics from Linux machines.

FirewallD:

firewall-cmd --permanent --add-port=161/udp
firewall-cmd --reload

UFW:

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.

Monitor Linux Machines with Observium - Add Linux Machines
Monitor Linux Machines with Observium – Add Linux Machines

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:

Monitor Linux Machines with Observium - All Devices
Monitor Linux Machines with Observium – All Devices

Click on Host/Device Name to see detailed information of a particular Host/Device.

Monitor Linux Machines with Observium - Device Information
Monitor Linux Machines with Observium – Device Information

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.

Monitor Linux Machines with Observium - Detailed GraphsTo check the healthiness of a particular device, go to Devices >> All Devices >>  Host/Device name >> Health. Click on sub menu of Graphs to see the detailed view of each metrics.

Monitor Linux Machines with Observium - System Health
Monitor Linux Machines with Observium – System Health

To view the Health of all devices in single place. Go to Health >> Choose Memory or Processor or Storage.

Monitor Linux Machines with Observium - Health of all devices
Monitor Linux Machines with Observium – Health of all devices

Screenshot of Observium front page dashboard.

Monitor Linux Machines with Observium - Dashboard
Monitor Linux Machines with Observium – 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

READ: How To Install Zabbix Monitoring Tool on CentOS 7 / Ubuntu 16.04 / Debian 9

READ: Install Icinga2 on Ubuntu 16.04 / 14.04, Debian 9

READ: How to Install Nagios on CentOS 7 / Ubuntu 16.04 / Fedora 27 / Debian 9

That’s all for now. We will meet in another article, soon.

You might also like

How to Monitor Linux Machines with Observium

0