Files
unpoller/pkg
davidyilee 6d1b1361fc feat(promunifi): export DOCSIS CI state metrics for UCI devices
Adds two new Prometheus metrics for UCI (UniFi Cable Internet) devices:

- unpoller_device_ci_state_operational (gauge): 1 if DOCSIS CI state ==
  "Operational", else 0. Suitable for alerting on cable link health.

- unpoller_device_ci_state_info (gauge=1, info-style): exposes the full
  DOCSIS CI state table as labels (ci_state, ci_sw_dl_status, ci_mac,
  ci_version, ci_mode) for diagnostic dashboards.

The controller does expose a top-level `internet` boolean on UCI
devices, but it is not a reliable WAN-reachability signal — it stays
false even when the cable link is fully operational and the upstream
WAN is up. The UCI is a cable bridge with no independent internet-
reachability probe; real WAN health lives on the upstream gateway
(e.g. UDM wan1.up).

The ci_state field from ci_state_table IS reported reliably and is the
correct source-of-truth for DOCSIS link health.

Verified on a UCI in Operational state (ci_mode=D3.1).
2026-05-24 15:58:25 -07:00
..
2023-07-31 14:40:33 -05:00