fix: correct unpoller metric names in Network & UniFi dashboard #10

Merged
greg merged 1 commits from klaatu/nixos:fix/network-dashboard-metrics into main 2026-03-27 13:51:18 +00:00
Collaborator

All metrics in the Network & UniFi Grafana dashboard had the wrong prefix (unifipoller_unpoller_) and several had entirely incorrect names. Corrected against the unpoller source (pkg/promunifi/):

Panel Old New
UniFi Devices unifipoller_device_uptime_seconds unpoller_device_uptime_seconds
WiFi Clients unifipoller_client_wifi_tx_rate_bps count(unpoller_client_uptime_seconds{wired="false"})
Wired Clients unifipoller_client_wired_tx_rate_bps count(unpoller_client_uptime_seconds{wired="true"})
WAN RX rate(unifipoller_device_wan_receive_bytes_total[5m]) unpoller_wan_max_rx_bytes_rate
WAN TX rate(unifipoller_device_wan_transmit_bytes_total[5m]) unpoller_wan_max_tx_bytes_rate
Port RX unifipoller_port_receive_bytes_total unpoller_device_port_receive_bytes_total
Port TX unifipoller_port_transmit_bytes_total unpoller_device_port_transmit_bytes_total
Client Throughput unifipoller_client_receive/transmit_bytes_total unpoller_client_receive/transmit_bytes_total
Device Status unifipoller_device_uptime_seconds unpoller_device_uptime_seconds

Notes:

  • wifi_tx_rate_bps and wired_tx_rate_bps do not exist; client type is distinguished by the wired label on unpoller_client_uptime_seconds
  • WAN metrics live under the unpoller_wan_* namespace (not unpoller_device_wan_*); max_rx/tx_bytes_rate are already instantaneous gauges, no rate() wrapper needed
  • Port metrics live under unpoller_device_port_* (the device_ segment was missing)

Opened by Klaatu 🌌

All metrics in the Network & UniFi Grafana dashboard had the wrong prefix (`unifipoller_` → `unpoller_`) and several had entirely incorrect names. Corrected against the unpoller source (`pkg/promunifi/`): | Panel | Old | New | |---|---|---| | UniFi Devices | `unifipoller_device_uptime_seconds` | `unpoller_device_uptime_seconds` | | WiFi Clients | `unifipoller_client_wifi_tx_rate_bps` | `count(unpoller_client_uptime_seconds{wired="false"})` | | Wired Clients | `unifipoller_client_wired_tx_rate_bps` | `count(unpoller_client_uptime_seconds{wired="true"})` | | WAN RX | `rate(unifipoller_device_wan_receive_bytes_total[5m])` | `unpoller_wan_max_rx_bytes_rate` | | WAN TX | `rate(unifipoller_device_wan_transmit_bytes_total[5m])` | `unpoller_wan_max_tx_bytes_rate` | | Port RX | `unifipoller_port_receive_bytes_total` | `unpoller_device_port_receive_bytes_total` | | Port TX | `unifipoller_port_transmit_bytes_total` | `unpoller_device_port_transmit_bytes_total` | | Client Throughput | `unifipoller_client_receive/transmit_bytes_total` | `unpoller_client_receive/transmit_bytes_total` | | Device Status | `unifipoller_device_uptime_seconds` | `unpoller_device_uptime_seconds` | Notes: - `wifi_tx_rate_bps` and `wired_tx_rate_bps` do not exist; client type is distinguished by the `wired` label on `unpoller_client_uptime_seconds` - WAN metrics live under the `unpoller_wan_*` namespace (not `unpoller_device_wan_*`); `max_rx/tx_bytes_rate` are already instantaneous gauges, no `rate()` wrapper needed - Port metrics live under `unpoller_device_port_*` (the `device_` segment was missing) > Opened by Klaatu 🌌
klaatu added 1 commit 2026-03-27 13:44:40 +00:00
fix: correct unpoller metric names in network dashboard
buildbot/nix-eval Build done. (1 warning)
buildbot/nix-build Build done.
de0b8fb07e
All metrics had wrong prefix (unifipoller_ → unpoller_) and several
had incorrect names entirely. Corrected against unpoller master source
(pkg/promunifi/):

- unifipoller_device_uptime_seconds → unpoller_device_uptime_seconds
- unifipoller_port_receive_bytes_total → unpoller_device_port_receive_bytes_total
  (port metrics live under device_ namespace: unpoller_device_port_*)
- unifipoller_port_transmit_bytes_total → unpoller_device_port_transmit_bytes_total
- unifipoller_device_wan_receive_bytes_total → unpoller_wan_max_rx_bytes_rate
  (no per-device WAN bytes total counter; WAN ns is unpoller_wan_*;
   rate metrics are already instantaneous gauges, no rate() wrapper)
- unifipoller_device_wan_transmit_bytes_total → unpoller_wan_max_tx_bytes_rate
- unifipoller_client_wifi_tx_rate_bps → count(unpoller_client_uptime_seconds{wired="false"})
  (no wifi-specific rate metric; wired label distinguishes client types)
- unifipoller_client_wired_tx_rate_bps → count(unpoller_client_uptime_seconds{wired="true"})
- unifipoller_client_receive_bytes_total → unpoller_client_receive_bytes_total
- unifipoller_client_transmit_bytes_total → unpoller_client_transmit_bytes_total

Bump dashboard version to 3.
greg approved these changes 2026-03-27 13:51:14 +00:00
greg merged commit 6f7b3c238e into main 2026-03-27 13:51:18 +00:00
Sign in to join this conversation.
No Reviewers
No labels
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: greg/nixos#10