How to Add Devices to LibreNMS Monitoring Tool
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.
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
Edit the SNMP configuration file.
Update the snmpd.conf with the below details.
# 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 <firstname.lastname@example.org> # Distro Detection extend .220.127.116.11.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
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.
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.
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:
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 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.
To see the Health of all devices in one place. Go to Health –> Choose Memory or Processor or Storage.
Screenshot of my front page dashboard (customized one).
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.