unpoller_unpoller/pkg/inputunifi
brngates98 aac4917da7 feat: Add WAN metrics export to Prometheus
Add comprehensive WAN metrics support to unpoller:

WAN Configuration Metrics:
- wan_failover_priority: WAN failover priority
- wan_load_balance_weight: Load balancing weight
- wan_provider_download_kbps: Configured ISP download speed
- wan_provider_upload_kbps: Configured ISP upload speed
- wan_smartq_enabled: SmartQueue QoS status
- wan_magic_enabled: Magic WAN status
- wan_vlan_enabled: VLAN configuration status

WAN Statistics Metrics:
- wan_uptime_percentage: WAN uptime percentage
- wan_peak_download_percent: Peak download utilization
- wan_peak_upload_percent: Peak upload utilization
- wan_max_rx_bytes_rate: Maximum receive rate
- wan_max_tx_bytes_rate: Maximum transmit rate

WAN Service Provider Metrics:
- wan_service_provider_asn: ISP autonomous system number

Labels include:
- wan_id, wan_name, wan_networkgroup
- wan_type (dhcp, static, pppoe)
- wan_load_balance_type (weighted, failover-only)
- isp_name, isp_city (service provider metrics)
- site_name, source

Changes:
- pkg/poller/config.go: Add WANConfigs field to Metrics struct
- pkg/poller/inputs.go: Append WAN configs in metric aggregation
- pkg/inputunifi/input.go: Add WANConfigs field to Metrics struct
- pkg/inputunifi/collector.go: Fetch WAN enriched configuration
- pkg/promunifi/wan.go: New WAN metrics exporter
- pkg/promunifi/collector.go: Initialize and export WAN metrics

Depends on: unpoller/unifi PR (WAN API support)

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-01-29 17:24:12 -05:00
..
LICENSE move to the pkg dir 2022-12-02 20:46:16 -05:00
README.md move to the pkg dir 2022-12-02 20:46:16 -05:00
collectevents.go Enrich alarms with device names for Loki logs 2026-01-25 12:17:12 -06:00
collector.go feat: Add WAN metrics export to Prometheus 2026-01-29 17:24:12 -05:00
input.go feat: Add WAN metrics export to Prometheus 2026-01-29 17:24:12 -05:00
interface.go Allow polling to continue when individual controllers fail 2026-01-25 12:01:37 -06:00
remote.go move remote.go to use unifi library functions 2026-01-25 08:59:11 -05:00
updateweb.go Rebasing 2025-12-24 00:25:09 -05:00

README.md

inputunifi

UnPoller Input Plugin