glossyio / traffic-monitor

Traffic Monitor built with edge ML for object detection and radar for speed monitoring
GNU General Public License v3.0
11 stars 1 forks source link

Save system metrics to local database/log #28

Open glossyio opened 2 weeks ago

glossyio commented 2 weeks ago

Problem

Follow-up on #24. System metrics only get sent as telemetry while device is connected and communicating with ThingsBoard. Want to save metrics to local database or logs for local analysis and potentially back-filling server data when connection is interrupted.

Proposed Solution

Save payload to SQLite database/logs.
Might create a large database, put a configurable retention limit.

Combine with #26 to solve this issue??

Alternative Solutions

Could leave it as telemetry-only, but it would be hard to diagnose issues if the device is offline.

Additional Info

mhlmhl commented 2 weeks ago

Instead of explicitly saving to a database, how about using MQTT + SQLite to do the same "behind the scenes".