Deduplicate device_events within a time window

When the same scanner sees the same device (same MAC and IPv4) again within
a configurable window (default 1 minute), only one device_events row is
recorded, keeping the events table from filling with near-identical rows.
Device last_seen updates and notifications are unaffected.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
rzuasti
2026-06-02 16:11:27 -04:00
co-authored by Claude Opus 4.8
parent c9e79e028f
commit dd089a9cbc
7 changed files with 187 additions and 18 deletions
+3
View File
@@ -49,3 +49,6 @@ api_key="CHANGE_ME" # API Key to use the system's API, change this!
[retention]
window="365d" # How long to keep device events and notifications. Records older than this are deleted daily. Supports: d (days), w (weeks), h (hours), m (minutes)
[device_events]
deduplication_window="1m" # If the same scanner sees the same device (same MAC and IP) again within this window, only one device event is recorded. Keeps the events table from filling with near-identical rows. Supports: d (days), w (weeks), h (hours), m (minutes), s (seconds)