astarte-platform / astarte

Core Astarte Repository
https://docs.astarte-platform.org/
Apache License 2.0
236 stars 45 forks source link

Support volatile triggers on all devices #929

Open Pavinati opened 2 months ago

Pavinati commented 2 months ago

It would be good to allow users to create volatile triggers on all devices like we do with triggers from the RealmMagement API.

This would allows frontends to handle a couple of important user cases:

1) identify devices that misbehave and get forcefully disconnected by Astarte By installing a volatile trigger on connections and one for disconnections of all devices, it becomes easy to see if there are devices that constantly disconnecting -> reconnecting in a short amount of time.

2) monitor for issues in the realm By installing a volatile trigger on device errors for all devices the frontend can monitor errors happening on the realm and provide useful insights on the number of devices throwing errors and the most common errors happening in the realm.

3) identify the device ID of a black-box device Devices that do not provide a label with the Astarte device ID are difficult to identify without inspecting the inner working of the device (like through SSH connection to the device itself). The user monitor for all device connections within a frontend while connecting its device to Astarte. The device will appear within there, making it easy to identify it.