Vignesh
Vignesh

Reputation: 812

Best way to monitor "connectionState" to identify connected devices in Azure IOTHub periodically

Our Use Case requires to implement the functionality to know if a device is Connected/Disconnected with accuracy<1 minute from WebApp. By implementing heartbeat pattern as advised (https://learn.microsoft.com/en-us/azure/iot-hub/iot-hub-devguide-identity-registry) with a large number of devices it creates enormous volumes of heartbeat messages and it results in generating 99.9% of quota messages just to know when a device goes offline (Disconnected).

Please help me to find the best solution for this.

Upvotes: 3

Views: 1542

Answers (1)

Roman Kiss
Roman Kiss

Reputation: 8235

For your scenario, you should use an Operations monitoring feature of the Azure IoT Hub. This monitoring is closed to the real-time (~8 seconds).

There is a bad news such as the Operations monitoring is going to be replaced by Diagnostics settings on 10/10/2018, which is not suitable (how it is working today) for a real-time monitoring. It's fine for logging and diagnostics purposes. I hope, the MS team will work for this issue to make the Diagnostics settings close to the real-time within the 60 seconds.

Update:

The following screen snippet shows an example of the output Diagnostics settings on streaming events captured by Azure Function:

azurefunction

As you can see, the latency time are minutes and also the events are not in the order when they are happen.

The best replacement of the Operations monitoring (category Connections) should be by Azure Event Grid, in other words making an event-driven.

Upvotes: 2

Related Questions