Skip to content
Go back

LibreNMS for SNMP-Heavy Home Networks

By SumGuy 9 min read
LibreNMS for SNMP-Heavy Home Networks

Your Switch Speaks SNMP. Prometheus Doesn’t Care.

You’ve got a UniFi switch, a MikroTik router, an APC UPS, and maybe a couple of access points. They all support SNMP. You spent an afternoon wiring up snmp_exporter with Prometheus, wrote a generator config, wrestled with MIB files, got confused by OID notation, and ended up with three graphs that sort of show interface traffic. Maybe.

Here’s the thing — snmp_exporter is fine if you already live in Prometheus and have one or two devices. But if your homelab has five or more SNMP-capable devices and you actually want to know things like which port just started dropping packets or is my PoE switch running out of budget, you’re using the wrong tool.

LibreNMS is the right hammer. It was built specifically for this problem, it knows about your hardware before you even configure anything, and it takes ten minutes to stand up with Docker Compose.


What LibreNMS Actually Is

LibreNMS is a community-maintained PHP network management system forked from Observium. That backstory matters because it means years of accumulated vendor MIBs — UniFi, MikroTik, Cisco, HP, Dell, APC, Brocade, Netgear, Ubiquiti — all pre-loaded. You add a device, it polls SNMP, it recognizes the OIDs, and it builds dashboards automatically.

No MIB hunting. No OID archaeology. It just works, which is a phrase I don’t use lightly.

What you get out of the box:

None of that is easy to replicate with Prometheus and snmp_exporter. You can do it, but you’re writing a second job for yourself.


Compose Install

The official librenms/librenms image handles the PHP app, dispatcher, and syslog receiver. You bring MariaDB and Redis.

docker-compose.yml
services:
db:
image: mariadb:11
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: changeme_root
MYSQL_DATABASE: librenms
MYSQL_USER: librenms
MYSQL_PASSWORD: changeme_librenms
volumes:
- db_data:/var/lib/mysql
command:
- mysqld
- --innodb-file-per-table=1
- --lower-case-table-names=0
- --character-set-server=utf8mb4
- --collation-server=utf8mb4_unicode_ci
redis:
image: redis:7-alpine
restart: unless-stopped
librenms:
image: librenms/librenms:latest
restart: unless-stopped
hostname: librenms
ports:
- "8000:8000"
environment:
DB_HOST: db
DB_NAME: librenms
DB_USER: librenms
DB_PASSWORD: changeme_librenms
REDIS_HOST: redis
REDIS_PORT: 6379
DISPATCHER_NODE_ID: dispatcher1
SIDECAR_DISPATCHER: 1
volumes:
- librenms_data:/data
depends_on:
- db
- redis
cap_add:
- NET_ADMIN
- NET_RAW
dispatcher:
image: librenms/librenms:latest
restart: unless-stopped
hostname: librenms-dispatcher
environment:
DB_HOST: db
DB_NAME: librenms
DB_USER: librenms
DB_PASSWORD: changeme_librenms
REDIS_HOST: redis
REDIS_PORT: 6379
DISPATCHER_NODE_ID: dispatcher1
SIDECAR_DISPATCHER: 1
volumes:
- librenms_data:/data
depends_on:
- librenms
volumes:
db_data:
librenms_data:

Bring it up:

Terminal window
docker compose up -d
docker compose exec librenms php artisan migrate --force
docker compose exec librenms php artisan db:seed --force
docker compose exec librenms lnms user:add -r admin admin

Hit http://your-server:8000 and log in as admin. You’ll see an empty dashboard. That’s expected — you haven’t added any devices yet.


SNMPv3 Setup

Use SNMPv3. v2c is fine for a locked-down homelab, but SNMPv3 gives you auth + encryption and takes about two minutes more to configure. Do it once, do it right.

On a UniFi Switch (USW-48-PoE or similar)

UniFi switches expose SNMP through the UniFi controller network settings, or directly on the switch CLI via SSH.

SSH to the switch and configure SNMPv3:

Terminal window
# SSH to the switch
# Enable SNMPv3 agent
configure
set service snmp community public
set service snmp v3 group homelab-rw seclevel priv
set service snmp v3 user librenms auth plaintext your_auth_password
set service snmp v3 user librenms auth type sha
set service snmp v3 user librenms privacy plaintext your_priv_password
set service snmp v3 user librenms privacy type aes
set service snmp v3 user librenms group homelab-rw
commit
save

For UniFi switches managed through the controller, go to Settings → Networks → SNMP and fill in the v3 credentials. The controller pushes the config.

Adding the Device to LibreNMS

In the LibreNMS UI: Devices → Add Device

Fill in:

Click Add Device. LibreNMS walks the MIB tree, identifies it as a UniFi switch, and starts building graphs. Per-port discovery happens automatically in the next poll cycle (default: 5 minutes).

You can also add devices via CLI inside the container:

Terminal window
docker compose exec librenms lnms device:add \
192.168.1.2 \
--snmpver v3 \
--authname librenms \
--authpass your_auth_password \
--authalgo SHA \
--cryptopass your_priv_password \
--cryptoalgo AES

What to Actually Monitor

Broadcast Storms via ifBroadcastPkts

Broadcast storms are the sneaky kind of network problem — your ping times get weird, throughput tanks, and nothing obvious shows up until you check per-port broadcast counters.

LibreNMS graphs ifBroadcastPkts (OID 1.3.6.1.2.1.31.1.1.1.9) automatically for every port. If port 14 starts showing 50k broadcasts/sec and every other port is under 100, you’ve found your misconfigured IoT device.

No custom OIDs required. No Prometheus recording rules. Just look at the graph.

PoE Budget on Powered Switches

If you’re running a PoE switch, LibreNMS polls the POWER-ETHERNET-MIB — specifically pethMainPseConsumptionPower (the total watts consumed across all PoE ports) and per-port power delivery via pethPsePortActualPower.

This matters when you’re adding more cameras or APs and want to know how much headroom you have before the switch starts brownout-limiting ports. You’ll find this under Device → Ports → PoE once the device is polled.

APC UPS via PowerNet-MIB

APC’s PowerNet-MIB is one of the most complete UPS SNMP implementations out there. LibreNMS recognizes APC hardware immediately and builds a UPS dashboard covering:

Add your UPS the same way you added the switch. If you’re running a Smart-UPS or Back-UPS with a network management card, point LibreNMS at its IP. If it’s USB-only with apcupsd running on a host, you can use the apcupsd poller module instead — LibreNMS supports both paths.

Terminal window
# Verify SNMP is reachable on your UPS first
snmpwalk -v2c -c public 192.168.1.50 .1.3.6.1.4.1.318.1.1.1

Alerts That Make Sense

LibreNMS’s alert rules UI is one of those things that makes you appreciate purpose-built tools. Setting up “alert me when a port goes down” in Alertmanager requires you to understand the exact label cardinality of your snmp_exporter scrape job and write a PromQL expression that still works after you rename a device. In LibreNMS, it’s a dropdown.

Go to Alerts → Alert Rules → Create Alert Rule.

Some useful rules to set up:

Port down:

High interface error rate:

UPS battery low:

PoE budget over 80%:

Notifications go to email, Slack, PagerDuty, Telegram, or any webhook. Configure transports under Alerts → Alert Transports.


When LibreNMS Is Overkill

Honest answer: if you have fewer than five SNMP devices and you’re already running Prometheus for everything else, snmp_exporter is probably fine. The operational overhead of running LibreNMS (MariaDB, Redis, the PHP app, and the dispatcher) isn’t worth it for a single switch and a router.

Similarly, if all you need is interface traffic graphs and you have a Grafana instance you love, a basic snmp_exporter config covering IF-MIB plus a Grafana dashboard template will get you 80% of the way there with less moving parts.

Where LibreNMS wins decisively:


LibreNMS + Prometheus: Better Together

These tools don’t compete — they cover different layers. Run both.

Link them by adding device hostnames to both systems. When something goes wrong, you can correlate: Prometheus shows the host went unreachable at 02:14, LibreNMS shows the uplink port went down at 02:13. There’s your timeline.

LibreNMS also has a Prometheus metrics exporter built in — it can push metrics to Pushgateway or expose a /metrics endpoint if you want SNMP data in Grafana alongside your host metrics. Enable it under Settings → External Integration → Prometheus.

config.php (LibreNMS)
$config['prometheus']['enable'] = true;
$config['prometheus']['url'] = 'http://pushgateway:9091';
$config['prometheus']['prefix'] = 'librenms';

The Bottom Line

Prometheus is great. Prometheus is not a network management system. If your homelab has real switching gear, PoE devices, or a UPS and you’ve been fighting snmp_exporter for three weekends, you’ve earned LibreNMS.

It auto-discovers your hardware, it knows your vendor MIBs, and it tells you when port 14 on your switch started throwing broadcast packets at 3 AM. That’s not a dashboard you build — that’s a dashboard that just exists the moment you add the device.

Stand it up with the Compose file above, point it at your switch with SNMPv3 creds, and let it run for a week. You’ll wonder what was going wrong on your network the whole time you weren’t looking.


Share this post on:

Send a Webmention

Written about this post on your own site? Send a webmention and it'll show up above once verified.


Previous Post
Bun vs Deno vs Node in 2026
Next Post
LLM Distillation Explained

Discussion

Powered by Garrul . Sign in with GitHub or Google, or post anonymously.

Related Posts