LibreNMS on Raspberry Pi


#1

Goal
Install LibreNMS on a Raspberry Pi to use as a Network Monitoring System for remote sites, home networks, etc.

On a Raspberry Pi 3 B+ and monitoring 6 devices, plus Syslog configuration, CPU utilization is plodding along at a pedestrian average of about 5% average. I imaging that a little Pi could probably monitor dozens of devices!

Helpful!
Not necessary, but helpful if you want FQDN device names instead of IP Addresses for your LibreNMS monitored devices. If you don’t have an enterprise network with DNS I suggest running something on your small/home network. I am running DD-WRT on my home router and have configured it for DNSMasq so I’m getting reliable hostname resolution on my local network.
https://wiki.dd-wrt.com/wiki/index.php/DNSMasq_as_DHCP_server

Raspberry Pi 3 B+


Buy the kit that suits you, power via USB, POE or a wall wart, your choice.

Memory
Jeff Geerling wrote a great article on the best SD Card to use in a Raspberry Pi 3 B+.
Raspberry Pi SD Card Performance Comparison

This is Jeff’s #1 recommendation: https://amzn.to/2T9enSZ

Distro
I chose the full distro, I’m using a 32GB card so I’m not concerned about hard drive space. After the install there is still 80% free HDD space.

I also want to be able to VNC into the device remotely to do network troubleshooting. I’m not a Linux whiz, I hope to be eventually but the desktop environment will help me.

Install the Distro

I used BalenaEtcher (see above) to create the install media. Go through the install process, get Raspbian installed and updated. Do not install anything else.

Reboot
Click the Raspberry in the Upper Left Corner > Preferences > Raspberry Pi Configuration

System

  • Set your hostname
    Interfaces [enable]
  • SSH
  • VNC
    Double Check other configuration settings. Reboot
    Set a static IP if desired.

Install LibreNMS
SSH into the Raspberry Pi

Follow THESE instructions:
https://docs.librenms.org/Installation/Installation-Ubuntu-1604-Apache/

Read through them before jumping in, know what each line is doing. Don’t just fly through, copying and pasting into the SSH session.

Be sure to set a legit MySQL password.

LibreNMS Syslog
If desired, install Syslog
Configure your devices to point to your LibreNMS install.

Add Devices

Have fun!


Install LibreNMS on Raspbian
Can't install, problem w/ composer
Can't install, problem w/ composer
#2

Average CPU utilization running LibreNMS on Raspbian, monitoring 6 devices with Syslog integration.


#3

I looked into this last year and I didn’t see php7 in the rpi repos. IIRC, php5 will no longer be supported soon.


Install on Raspbian stretch
#4

It works now, but may not work for much longer. I’m holding out hope for a Pi PHP7 repo…


#5

Hi everyone

This guide is very helpful, thank you. FYI I have run in to the problem with PHP7.0 not being supported, I got an error from the composer install line on the LibreNMS documentation.

The way I have found around this is to use the source list for apt from the test repo for the next version of raspbian codenamed buster:

sudo nano /etc/apt/sources.list

Modifying to match:

deb http://raspbian.raspberrypi.org/raspbian/ buster main contrib non-free rpi

Once this is done run:

sudo apt update && sudo apt upgrade

You can then install the required php7.2* packages. One problem is I cannot find a php7.2-mcrypt package.

Update: I have followed these instructions to get mcrypt for php 7.2:

I hope this helps those who are struggling.

Thanks
Jonathan


#6

This is amazing, are there any Pi cases that would be enterprise appropriate. This is the perfect solution for those complicated customer sites where you don’t get full visibility, work from homes and what not. Also how stable are these power connectors