feat: heartbeat detection and sensor metrics

- Heartbeat service: check_sensor_status (online/stale/offline)
- GET /sensors/heartbeat: status summary for all sensors
- POST /sensors/heartbeat: refresh heartbeat status
- GET /sensors/<hostname>/metrics: activity counts, recent events
- CLI command: flask check-heartbeats
- Added 7 new tests (34 total)
This commit is contained in:
user
2026-02-05 21:23:55 +01:00
parent 4b72b3293e
commit b36b1579c7
5 changed files with 286 additions and 4 deletions

View File

@@ -11,8 +11,8 @@
- [x] `POST /api/v1/sensors/<id>/calibrate` — trigger calibration
### P2 - Normal
- [ ] Sensor heartbeat timeout detection
- [ ] Sensor metrics history endpoint
- [x] Sensor heartbeat timeout detection
- [x] Sensor metrics history endpoint
### P3 - Low
- [ ] Add pagination to all list endpoints