Full SNMP Monitoring on Raspberry Pi 5 for LibreNMS (UCD-SNMP + Extend Workaround)

Date: May 14, 2025
Category: Monitoring / SNMP
Backlink: LibreNMS Docker Deployment on Raspberry Pi 5


🧩 Overview

This update documents how I configured full-featured SNMP monitoring on a Raspberry Pi 5 running LibreNMS inside Docker. Since hrProcessorLoad and traditional Host Resources MIB features are often unavailable or broken on ARM-based systems, I used UCD-SNMP and NET-SNMP-EXTEND-MIB to monitor:


🔧 Step-by-Step Setup

1. Edit SNMP Configuration

Update /etc/snmp/snmpd.conf with:

rocommunity public
disk / 10000

view   systemonly  included   .1.3.6.1.2.1.1
view   systemonly  included   .1.3.6.1.2.1.25
view   systemonly  included   .1.3.6.1.4.1.2021
view   systemonly  included   .1.3.6.1.4.1.8072.1

extend temp /bin/bash /usr/local/bin/snmp-temperature.sh

The disk line enables / monitoring. The extend line provides temperature monitoring.


2. Create Extend Script for CPU Temp

sudo nano /usr/local/bin/snmp-temperature.sh

Paste:

#!/bin/bash
vcgencmd measure_temp | sed "s/temp=//;s/'C//"

Make it executable:

sudo chmod +x /usr/local/bin/snmp-temperature.sh

3. Give SNMP Access to Pi Temperature Sensor

sudo usermod -aG video Debian-snmp
sudo reboot

4. Verify SNMP Outputs

snmpwalk -v2c -c public localhost .1.3.6.1.4.1.2021.4     # Memory
snmpwalk -v2c -c public localhost .1.3.6.1.4.1.2021.9     # Disk
snmpwalk -v2c -c public localhost hrProcessorLoad        # CPU per core
snmpwalk -v2c -c public localhost .1.3.6.1.4.1.2021.10    # Load avg
snmpwalk -v2c -c public localhost NET-SNMP-EXTEND-MIB::nsExtendOutput1Line.\"temp\"   # Temperature

5. Ensure Pi is Added in LibreNMS

In the web UI:


📦 Inside the Docker Container

Enter container:

docker exec -it librenms bash
cd /opt/librenms

Run poller and rediscovery:

php artisan config:clear
./lnms poller:discovery 1
./lnms device:poll 1

📊 Final Results in LibreNMS

From the Pi's page:


🩺 Troubleshooting Addendum

❌ Memory Graphs Not Appearing?

Make sure:


✅ Wrap-Up

With this configuration, the Pi 5 running LibreNMS inside Docker is now monitoring itself via SNMP, including:

This setup is now replicable for other ARM-based Linux systems with similar SNMP limitations!




Revision #1
Created 14 May 2025 23:35:38 by Nate Nash
Updated 21 December 2025 18:11:14 by Nate Nash