unpoller_unpoller/pkg
Cody Lee c596e82cf2
fix: use v2 traffic API as DPI fallback for Network 9.1+ firmware (#985)
The legacy /stat/stadpi and /stat/sitedpi endpoints return empty data
on UniFi Network 9.1+ (issue #834). The v2 /traffic endpoint already
existed in the unifi library and in the collector, but was only called
when both SaveTraffic and SaveDPI were enabled — most users only set
SaveDPI=true and never saw any data.

- Remove the SaveTraffic gate on GetClientTraffic; call it whenever
  SaveDPI is enabled, treating it as a DPI data source
- Downgrade GetClientTraffic errors to debug-log so old firmware that
  lacks the v2 endpoint continues to use the legacy API without error
- Add convertToSiteDPI to aggregate per-client v2 data into per-site
  DPITable entries, filling SitesDPI when the legacy endpoint is empty
- Legacy API results are preserved; v2 data only supplements sites not
  already covered, so old-firmware users are unaffected

Co-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 09:42:35 -05:00
..
datadogunifi feat: add Site Magic site-to-site VPN metrics (closes #926) (#983) 2026-03-23 21:08:09 -05:00
influxunifi feat: add Site Magic site-to-site VPN metrics (closes #926) (#983) 2026-03-23 21:08:09 -05:00
inputunifi fix: use v2 traffic API as DPI fallback for Network 9.1+ firmware (#985) 2026-03-28 09:42:35 -05:00
lokiunifi chore: apply linter auto-fixes (wsl_v5, nlreturn, tagalign) (#984) 2026-03-23 21:10:52 -05:00
mysqlunifi
otelunifi chore: apply linter auto-fixes (wsl_v5, nlreturn, tagalign) (#984) 2026-03-23 21:10:52 -05:00
poller chore: apply linter auto-fixes (wsl_v5, nlreturn, tagalign) (#984) 2026-03-23 21:10:52 -05:00
promunifi chore: apply linter auto-fixes (wsl_v5, nlreturn, tagalign) (#984) 2026-03-23 21:10:52 -05:00
unittest Temp fix for test cases and warning from Dockerfile 2025-12-24 00:23:05 -05:00
webserver Fix health check port binding conflict (issue #892) 2025-12-09 08:11:21 -06:00