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:
- Auto-discovery — walk your subnet, LibreNMS finds every SNMP-speaking device
- Per-port graphs — TX/RX bytes, errors, discards, broadcast packets, per interface
- ifAlias-aware labeling — if your port says
uplink-to-routerin SNMP, LibreNMS shows that - Port flap alerts — link up/down events with correlation across your entire network
- PoE budget monitoring — per-port power draw on PoE switches that expose it
- UPS metrics — input/output voltage, load percentage, battery charge via PowerNet-MIB
- Notification Rules — threshold-based alerting with a UI that actually makes sense for network thresholds
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.
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:
docker compose up -ddocker compose exec librenms php artisan migrate --forcedocker compose exec librenms php artisan db:seed --forcedocker compose exec librenms lnms user:add -r admin adminHit 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:
# SSH to the switch
# Enable SNMPv3 agentconfigureset service snmp community publicset service snmp v3 group homelab-rw seclevel privset service snmp v3 user librenms auth plaintext your_auth_passwordset service snmp v3 user librenms auth type shaset service snmp v3 user librenms privacy plaintext your_priv_passwordset service snmp v3 user librenms privacy type aesset service snmp v3 user librenms group homelab-rwcommitsaveFor 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:
- Hostname/IP:
192.168.1.2 - SNMP version:
v3 - Auth username:
librenms - Auth level:
authPriv - Auth algorithm:
SHA - Auth password: your auth password
- Privacy algorithm:
AES - Privacy password: your priv password
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:
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 AESWhat 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:
- Input voltage and frequency
- Output load percentage
- Battery charge percentage and estimated runtime
- Temperature (if the UPS reports it)
- Transfer events (line to battery, battery to line)
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.
# Verify SNMP is reachable on your UPS firstsnmpwalk -v2c -c public 192.168.1.50 .1.3.6.1.4.1.318.1.1.1Alerts 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:
- Matches:
ports.ifOperStatus = down AND ports.ifAdminStatus = up - Meaning: port is administratively up but physically down — that’s a real problem, not a shutdown port
High interface error rate:
- Matches:
ports.ifInErrors_rate > 100 OR ports.ifOutErrors_rate > 100 - Per-minute error rates above 100 indicate a bad cable or duplex mismatch
UPS battery low:
- Matches:
upsStatsBatteryCapacity < 25 - Under 25% battery on the UPS, you want to know before the power comes back on and it’s at 10%
PoE budget over 80%:
- Matches:
EntitySensor.value > 80scoped to the PoE consumption sensor
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:
- You have five or more SNMP devices across multiple vendors
- You want port flap history and link event correlation
- You need PoE or UPS monitoring without writing custom OID configs
- You want alerting that understands SNMP semantics without a PromQL PhD
LibreNMS + Prometheus: Better Together
These tools don’t compete — they cover different layers. Run both.
- Prometheus monitors your hosts (node_exporter), containers (cAdvisor), and applications (your custom metrics)
- LibreNMS monitors your network layer — switches, routers, APs, UPS units, printers, anything that speaks SNMP
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['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.