u/MrJimBusiness-

Self-hosted UniFi monitoring system

Over a year in the works, I just wrapped up adding full time-series network monitoring to Network Optimizer. Here are the main features:

  • Ping / RTT measurement across multiple different kinds of targets at different cadences
  • Real-time 3D view of both LAN and WAN traffic across all devices on your UniFi Network
  • CPU / mem / temperature (gateway only so far) stats collected and plotted
  • Auto-discovery of your ISP's access and aggregation infrastructure, and their upstream transit network(s) for suitable monitoring targets
  • Built in monitoring targets for common CDN/internet service providers
  • SFP/ONT optical power monitoring with GPON vs XGS-PON auto-detection (covers most common SFP stick modules from FiberMall, Zyxel, Nokia, Leox, Calix, ODI, SourcePhotonics, etc.)

Some caveats:

  • Wi-Fi device transfer rates are laggy since we can't really pull per-wireless-device data w/ SNMP, it relies on UniFi Network endpoints that really only refresh data every 30 sec
  • Up to 250 MB per day on big home networks required in InfluxDB storage, I wouldn't run the InfluxDB server on a R-Pi or anything embedded
  • Don't leave up the 3D live view on your phone, it will drain your battery pretty well
  • Does generate some extra network traffic about 500 Kbps with 10 UniFi Network devices and 25 ping targets, and a portion of that over WAN
  • I still have a bunch of work left to do to bring the diagnostic capabilities of all of this data full circle, but you can easily build a Grafana dashboard to dive into the InfluxDB data however you'd like
  • Doesn't use UnPoller, this is based on my own .net based SNMP polling library I've been working on and have had in production for 13 months now over several iterations
  • I've tested the impact of the SNMP polling for over a year, and my network hasn't skipped a beat now that I have it fully optimized. The setup process walks you through enabling SNMP and encourages you to use SNMP v1/2c and NOT SNMP v3. I highly advise against using SNMP v3 (crypto overhead on both ends for every polling event) and instead locking down your management VLAN and using an obfuscated community string. The setup wizard walks you through these things and SNMP of course is just read-only stats of your network fabric devices, so no worries.
  • InfluxDB chosen for my own preference, simplicity, flexibility, and its nice query language. Prometheus support could be added, but InfluxDB is pretty lightweight if you want to run both.

Available here: https://github.com/Ozark-Connect/NetworkOptimizer Deployment guide: https://github.com/Ozark-Connect/NetworkOptimizer/blob/main/docker/DEPLOYMENT.md

Make sure to take in all of the other Network Optimizer features while you're in there... there's a lot.

Please feel free to DM me if you need anything!

u/MrJimBusiness- — 5 hours ago
▲ 214 r/Ubiquiti

UCG-Fiber performance tweaks (including 2.5 gig SFP support)

Got these tested well enough thanks to a bunch of folks here, went ahead and added a deployment system to Network Optimizer for the following performance tweaks for the UCG-Fiber / UXG-Fiber, with more to come.

  • SSD offload of UniFi Network's MongoDB (reduces eMMC write wear and load and gets UniFi Network a little snappier)
    • Should work fine on UCG-Max too
  • SFP+ 2 (Port 7) SGMII+ / HSGMII 2.5 gig support (for GPON ONT SFP and MoCA SFP users)
    • Port 6 support can be added soon, I just need somebody to collab and test it for me since I repurposed my UCG-Fiber lab gateway
  • Fan / temp control - light recalibration of the factory params (instead of a whole script that manages it)
    • This should work fine on UCG-Max as well, but looking for confirmation
  • Bypassing eMMC writing of system logs (mostly to reduce eMMC load and wear)
    • Same here, just need somebody to test on UCG-Max

I've confirmed compatibility with all of the current Official, RC, and EA releases of Network and UniFi OS on a few gateways, and testers have helped with additional testing and feedback (thanks guys!).

Still, disclaimer, YMMV, please follow the cautionary items before deploying these scripts/patches. Always backup and ensure you're ready to factory restore before applying any customization like this to your gateway.

Full background on the tweaks, with their evolution and research/lab work: https://github.com/Ozark-Connect/unifi-perf-tweaks
Network Optimizer can be found here, self hosted, free for personal use: https://github.com/Ozark-Connect/NetworkOptimizer

edit: some screenshots since the video quality is shite https://imgur.com/a/AI9LRAx

edit 2: SFP+ 1 (Port 6) support is up on Network Optimizer now https://github.com/Ozark-Connect/NetworkOptimizer/releases/tag/v1.16.2

u/MrJimBusiness- — 15 days ago

Just took a bit of ghidra work, and a cross compiled custom module for the IPQ PHY stack but I got 2500 Mbps SFP (SGMII+) working on the UXG-Fiber / UCG-Fiber. Stable for about 16 hours now, to be enhanced with a watchdog and such soon. I'll add it to my UniFi performance tweaks GitHub Repo. Just DM me with a summary of how you'll be using this, your GitHub username, which SFP port you need to bump the speed up on, and that you won't yell at me if this firmware mod bricks your gateway, and I'll send you an invite to the repo.

The good news is this would be like a 10 line code fix on the firmware side, maybe 200 lines max in UniFi Network and the management plane, for Ubiquiti to add official support for SFP 2.5 gig to the IPQ gateways. I'd encourage to keep bugging them about it. It seems to work at the firmware and hardware level just fine with minimal changes. It's fully supported by the Qualcomm IPQ SSDK it just needs to be coded for.

For me, this cleared up a ton of TX drops (egress to the host gateway, download direction) on my SFP GPON ONT due to the 1 gig physical interface being a bottleneck for GPON bursts and there being very little frame buffer on the stick. Was getting about 1.5-2% loss which was devasting to CUBIC sending downloads and just consistent downstream performance in general.

u/MrJimBusiness- — 24 days ago