40 Commits

Author SHA1 Message Date
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
Cody Lee
511c524e6e feat(influxunifi): add global tags applied to every measurement
Closes #1001. Mirrors the DataDog plugin's global tags feature for
InfluxDB. Per-metric tags take precedence on key collision so
site/device identifiers can never be overwritten by a misconfigured
global. Configurable via TOML/JSON/YAML under influxdb.tags.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-09 08:59:16 -05:00
Cody Lee
07781214c3 Add config option to suppress unknown device type messages
Adds log_unknown_types config option (default: false) to control logging
of unknown UniFi device types. When disabled (default), unknown devices
are silently ignored to reduce log volume. When enabled, they are logged
as DEBUG messages instead of ERROR. Addresses issue #912.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-25 11:24:33 -06:00
Sofiane A
5a89a4634a Add default_site_name_override to support customizable default site names 2025-04-29 16:12:32 +02:00
Cody Lee
c002283387 fixes the webserver default file path issues 2023-04-13 09:56:24 -05:00
Cody Lee
8a3bb1a562 add documentation for timeout 2022-12-08 21:14:43 -06:00
Cody Lee
bd51cf59f3 move to a common pattern on output plugins to catch common issues 2022-12-05 22:00:48 -06:00
davidnewhall2
6197177a45 update config file options 2020-07-19 00:17:47 -07:00
davidnewhall2
eacce79785 updates 2020-06-29 22:36:05 -07:00
davidnewhall2
101b066036 update examples 2020-06-25 22:39:42 -07:00
davidnewhall2
4a4160d10c Add events 2020-06-20 04:18:41 -07:00
davidnewhall2
b32a9edebf fix 2020-06-15 06:05:37 -07:00
davidnewhall2
9f58c65acc update docs and examples 2020-06-15 02:19:09 -07:00
davidnewhall2
22741ccab3 update docs 2020-02-04 20:04:17 -08:00
davidnewhall2
2e252b5069 Fix defaults 2020-02-03 00:10:00 -08:00
davidnewhall2
5fe2c0879b add freebsd package building 2020-02-01 00:25:25 -08:00
davidnewhall2
bd0680b92a Add DPI collection 2019-12-27 23:59:16 -08:00
davidnewhall2
3f6a3e9721 ocd 2019-12-20 03:22:41 -08:00
davidnewhall2
ed3bed4c7b rename some things 2019-12-20 03:19:00 -08:00
davidnewhall2
de16ba2399 fixes 2019-12-20 02:44:53 -08:00
davidnewhall2
d3d420597e make dumper work 2019-12-17 01:31:30 -08:00
davidnewhall2
44c544d8e1 Add dynamic plugin support 2019-12-16 03:11:40 -08:00
davidnewhall2
ac39d1727f make output plugins call in to initialize 2019-12-15 02:52:43 -08:00
davidnewhall2
510251252b update docs 2019-12-14 19:37:41 -08:00
davidnewhall2
cef7815e2d allow more data reduction 2019-11-30 03:42:17 -08:00
davidnewhall2
ebe05ec3e5 move pkgs, update readme, add two more metrics to influx client 2019-11-30 01:45:42 -08:00
davidnewhall2
9743a83aff fix comments 2019-11-29 13:55:59 -08:00
davidnewhall2
6bcdfcda0e Update comment 2019-11-27 02:57:24 -08:00
davidnewhall2
640075da94 fix more port numbers 2019-11-25 00:19:05 -08:00
davidnewhall2
bee5a5901c add site code 2019-11-17 03:02:25 -08:00
davidnewhall2
7094c2ce2c this is just a start, nothing works yet 2019-11-12 00:04:01 -08:00
David Newhall II
bdfec45579 Remove max errors parameter 2019-09-25 00:12:09 -07:00
davidnewhall2
de365d802f Fix some bugs. 2019-09-20 18:36:20 -07:00
David Newhall II
b0fbfff621 Fix default user in config files. 2019-08-26 02:16:44 -07:00
David Newhall II
10d17b4a31 Add reauth feature, remove errors library. 2019-08-25 01:54:19 -07:00
David Newhall II
148b5776cd Add IDS/IPS support. 2019-07-11 01:18:40 -07:00
David Newhall II
df46550a4f Call it mode. 2019-06-23 19:55:26 -07:00
David Newhall II
fec1252d5e update examples for lambda config 2019-06-23 16:28:51 -07:00
David Newhall II
04e6d67489 Man file and config file updates. 2019-06-22 19:41:44 -07:00
David Newhall II
83c5a862b9 More untested thingies. 2019-06-21 04:09:12 -07:00