Files
beacon-server/db/migrations/045_clean_partial_observer_telemetry.sql
T
MrAlders0n 14354b03dc fix(telemetry): stop partial and bogus stats inflating bucketed counters
Bucketed airtime and receive errors used MAX - MIN per bucket, so one zeroed,
replayed or garbage row counted the whole running total (e.g. 47,737 s RX in a
6 h bucket). Buckets are now summed from per-row increments with dips, stale
replays and physically impossible jumps rejected. Ingest skips uptime-only
stats and a migration deletes the rows already stored.
2026-09-30 16:32:11 -04:00

8 lines
371 B
SQL

-- Copyright 2026 Beacon Contributors
-- SPDX-License-Identifier: AGPL-3.0-or-later
-- Some /status messages carry uptime but no radio stats. Those rows zero the airtime and
-- noise floor, dragging bucket averages down; ingest now skips them (statusStats.usable).
DELETE FROM observer_telemetry
WHERE noise_floor_db = 0 AND airtime_tx_secs = 0 AND airtime_rx_secs = 0;