unpoller_unpoller/examples
Cody Lee dabfeffe66
fix(prometheus): serve scrapes from cached background poll (#1013)
Decouples Prometheus scrape cadence from upstream UniFi API calls so a
429 backoff loop on the controller side no longer stalls /metrics. The
output plugin now owns a 60s background poller (configurable) whose
result is served from an in-memory cache. Concurrent /scrape requests
for the same target are coalesced via singleflight to prevent a noisy
scraper from multiplying upstream load.

Adds two new metrics so operators can detect cache staleness and
refresh failures independently:
- unpoller_prometheus_cache_age_seconds
- unpoller_prometheus_refresh_failures_total

Background goroutine recovers from panics so a malformed input payload
no longer silently kills refreshes.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-11 17:43:44 -05:00
..
MANUAL.md Add Docker health check support 2025-12-08 13:09:10 -06:00
README.md
k8s_influx.yaml
k8s_unifi_poller.yaml
remote_api_example.conf Add config option to suppress unknown device type messages 2026-01-25 11:24:33 -06:00
remote_api_example.json Add remote API support for UniFi Site Manager 2026-01-24 17:32:36 -05:00
remote_api_example.yaml Add config option to suppress unknown device type messages 2026-01-25 11:24:33 -06:00
up.conf.example fix(prometheus): serve scrapes from cached background poll (#1013) 2026-05-11 17:43:44 -05:00
up.json.example fix(prometheus): serve scrapes from cached background poll (#1013) 2026-05-11 17:43:44 -05:00
up.yaml.example fix(prometheus): serve scrapes from cached background poll (#1013) 2026-05-11 17:43:44 -05:00

README.md

Examples

This folder contains example configuration files in four supported formats. You can use any format you want for the config file, just give it the appropriate suffix for the format. A JSON file should end with .json, and YAML with .yaml. The default format is always TOML and may have any other suffix.

Kubernetes

There are two files for Kubernetes deployment examples. Feel free to use them as you see fit. Please make sure to the delete all comments before deploying and make sure to fill in with correct values.

Notes

When adding new content to this folder, DO NOT MAKE NEW FOLDERS, it will break make install on macOS (used for homebrew).