unpoller_unpoller/pkg/inputunifi
Cody Lee 6c5ff5482d
feat(promunifi): add unifi_controller_up gauge metric (closes #356) (#974)
Add a per-controller `<namespace>_controller_up` Prometheus GaugeVec with
a `source` label (controller URL or configured ID). The gauge is set to 1
after each successful poll and 0 on failure, giving operators a standard
metric to alert on controller connectivity issues.

Changes:
- pkg/poller/config.go: add ControllerStatus type and ControllerStatuses
  field to Metrics so any output plugin can consume per-controller health.
- pkg/poller/inputs.go: merge ControllerStatuses when AppendMetrics is
  called (multiple input sources).
- pkg/inputunifi/interface.go: populate ControllerStatuses with Up=true
  on success and Up=false (while still continuing) on per-controller error.
- pkg/promunifi/collector.go: declare and register a prometheus.GaugeVec
  `<namespace>_controller_up`; set the gauge for each controller status
  after every Collect cycle.

Co-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 15:25:00 -05:00
..
LICENSE
README.md
collectevents.go fix(inputunifi): gracefully handle 404s from remote API event endpoints (#971) 2026-03-23 14:30:49 -05:00
collector.go fix(inputunifi): recover from GetActiveDHCPLeasesWithAssociations panic (#969) 2026-03-22 15:07:03 -05:00
discover.go Replace Python endpoint-discovery with --discover flag (replaces #936) 2026-01-30 20:17:00 -05:00
input.go fix(influxunifi): use CelsiusSafe() for temp fields to fix InfluxDB type conflict (#944) (#945) 2026-02-03 20:12:26 -06:00
interface.go feat(promunifi): add unifi_controller_up gauge metric (closes #356) (#974) 2026-03-23 15:25:00 -05:00
remote.go Fix remote API (Fabric/API key): 429 handling, NVR filter, updateWeb nil panic (#958) 2026-02-18 06:34:04 -05:00
updateweb.go Fix remote API (Fabric/API key): 429 handling, NVR filter, updateWeb nil panic (#958) 2026-02-18 06:34:04 -05:00

README.md

inputunifi

UnPoller Input Plugin