19 Commits

Author SHA1 Message Date
Cody Lee
8c7f1cb854 fix: remove age==0 guard that silently dropped all rogue AP metrics (#972)
save_rogue = true collected data from the controller but never wrote
any of it to the output backends. All three exporters (InfluxDB, Datadog,
Prometheus) had the same guard:

    if s.Age.Val == 0 { return }

The intent was to drop stale entries, but the logic is inverted: Age==0
means brand-new or (more commonly) that the UniFi controller did not
include an "age" field in the JSON response, causing FlexInt to default
to 0. This silently discarded every rogue AP record.

Remove the guard entirely. The data was just fetched on-demand from the
controller; if the user opted in to save_rogue, they want all of it.

Fixes #405

Co-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 14:53:07 -05:00
Cody Lee
b372198840 painful upgrade for dumb go versioning 2024-12-31 14:44:10 -06:00
Cody Lee
ffb8579369 add integration test guard;
datadog integration test works

influx package tests

update unifi version

golanglint-ci and address *all* issues.

all tests pass

bump unifi version
2023-07-31 14:40:33 -05:00
Cody Lee
0329066fe5 remote upgrade metrics for #433 2022-12-21 20:14:22 -06:00
Cody Lee
247cc868b3 go 1.19 interface{} -> any 2022-12-03 16:32:12 -06:00
Cody Lee
06594f67eb move to the pkg dir 2022-12-02 20:46:16 -05:00
davidnewhall2
5e203701b5 initial 2019-12-28 17:08:16 -08:00
davidnewhall2
84edadaa94 Make a new docker image 2019-12-24 23:43:49 -08:00
davidnewhall2
0b8473657e convert input to plugin 2019-12-15 20:56:42 -08:00
davidnewhall2
ecd1c64004 Updates 2019-12-10 01:19:56 -08:00
davidnewhall2
4f77e5ea36 update deps, fix channel bug for uap_vaps 2019-12-03 12:09:07 -08:00
davidnewhall2
f4e55340fc a couple others missing 2019-12-01 14:39:18 -08:00
davidnewhall2
dc9abc8ca8 more fixes 2019-12-01 03:26:13 -08:00
davidnewhall2
9eeeaebabd fixes 2019-12-01 00:43:57 -08:00
davidnewhall2
ec3bae40be test fix 2019-11-30 19:30:21 -08:00
davidnewhall2
36e88dcaf4 more reusable code 2019-11-30 18:18:49 -08:00
davidnewhall2
50c1a635c6 Improve influx library 2019-11-30 16:45:22 -08:00
davidnewhall2
f9a4963b23 remove a bunch of unused things from influx code 2019-11-30 02:47:11 -08:00
davidnewhall2
ebe05ec3e5 move pkgs, update readme, add two more metrics to influx client 2019-11-30 01:45:42 -08:00