feat: add network topology metrics (closes #931) (#981)

Bumps github.com/unpoller/unifi/v5 to v5.23.0 which adds
GetTopology() fetching vertices (devices/clients) and edges
(wired/wireless connections) from /proxy/network/v2/api/site/{site}/topology.

Changes across the stack:
- poller.Metrics: add Topologies []any field + AppendMetrics support
- inputunifi: collect topology per-site (non-fatal on older controllers),
  pass through augmentMetrics with site name override support
- promunifi: new topology.go with summary, connection-type, link-quality,
  and band-distribution gauges
- influxunifi: new topology.go with topology_summary and topology_edge
  measurements
- datadogunifi: new topology.go with equivalent Datadog gauges
- otelunifi: new topology.go with OpenTelemetry gauge observations

Co-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Cody Lee
2026-03-23 18:44:51 -05:00
committed by GitHub
parent f3d4e21e0e
commit 643c108674
14 changed files with 482 additions and 2 deletions

View File

@@ -278,6 +278,7 @@ func AppendMetrics(existing *Metrics, m *Metrics) *Metrics {
existing.WANConfigs = append(existing.WANConfigs, m.WANConfigs...)
existing.Sysinfos = append(existing.Sysinfos, m.Sysinfos...)
existing.FirewallPolicies = append(existing.FirewallPolicies, m.FirewallPolicies...)
existing.Topologies = append(existing.Topologies, m.Topologies...)
existing.ControllerStatuses = append(existing.ControllerStatuses, m.ControllerStatuses...)
return existing