mirror of
https://github.com/unpoller/unpoller.git
synced 2026-03-31 06:24:19 -04:00
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>
5.4 KiB
5.4 KiB