How to Add Devices to LibreNMS Monitoring Tool

0
Add Devices to LibreNMS
Add Devices to LibreNMS

In our last article, we set up LibreNMS monitoring tool for monitoring servers and network devices. This guide focus on adding devices to LibreNMS tool for monitoring. Assuming that you have a working setup for LibreNMS monitoring tool, if not, follow the below guide.

READ: Install LibreNMS on CentOS 7 / Ubuntu 16.04 – A Network and Server Monitoring Tool

For a demo purpose, we will install and configure SNMP on the client servers (Linux machines), and then will configure LibreNMS to collect data’s from clients via SNMP protocol.

Install SNMP:

Use the following command to install SNMP package.

### CentOS 7 / RHEL 7 ###

yum -y install net-snmp

### Ubuntu 16.04 ###

apt-get -y install snmpd

Configure SNMP:

Edit the SNMP configuration file.

vi /etc/snmp/snmpd.conf

Update the snmpd.conf with the below details.

Below is the minimal SNMP configuration recommended by LibreNMS. If you have custom SNMP configuration present on the client server, then just update below lines with existing configurations, otherwise, delete snmpd.conf file and create it again with below content.
# Change "libre" to your preferred SNMP community string

com2sec readonly default libre

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 .1.3.6.1.4.1.2021.7890.1 distro /usr/bin/distro

Install distro script to get OS information on LibreNMS.

curl -o /usr/bin/distro https://raw.githubusercontent.com/librenms/librenms-agent/master/snmp/distro
chmod +x /usr/bin/distro

Restart snmpd service.

systemctl restart snmpd

Enable snmpd service on system boot.

systemctl enable snmpd

Ensure snmpd listens on all network interface or on a particular interface which is accessible to LibreNMS.

netstat -antup | grep -i 161

Output:

udp        0      0 0.0.0.0:161             0.0.0.0:*                           25268/snmpd

Adding devices to LibreNMS:

Login into LibreNMS monitoring tool.

To add any device, go to Devices –> Add Device.

Enter Hostname, SNMP version (v2c – leave the default), port number (161), and community name on this page.

Add Devices to LibreNMS - Adding New Device
Add Devices to LibreNMS – Adding New Device

As recommended in LibreNMS setup, we will add localhost (LibreNMS server) as a first device.

Wait for few minutes to let LibreNMS collects data of the newly added device.

Polling for newly added device happens every five minutes, and discovery of all device happens every six hours.

Repeat same steps to add all of your network devices and servers. You can list out the added devices by going to Devices –> All Devices.

Screenshot all devices:

Add Devices to LibreNMS - List of Devices
Add Devices to LibreNMS – List of Devices

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

Add Devices to LibreNMS - Device Information
Add Devices to LibreNMS – 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.

Add Devices to LibreNMS - Detailed Graphs
Add Devices to LibreNMS – Detailed Graphs

To check the healthiness of a device, go to Devices –> All Devices –> Host/Device name –> Health. Click on sub menu of Graphs to see the detailed view of each metrics.

Add Devices to LibreNMS - Device Health
Add Devices to LibreNMS – Device Health

To see the Health of all devices in one place. Go to Health –> Choose Memory or Processor or Storage.

Add Devices to LibreNMS - All Devices Health
Add Devices to LibreNMS – All Devices Health

Screenshot of my front page dashboard (customized one).

Add Devices to LibreNMS - Dashboard
Add Devices to LibreNMS – Dashboard

LibreNMS is a great tool and has maximum capabilities for monitoring server and network devices. Don’t miss to explore all the possibilities of LibreNMS.

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

You might also like