We are trying to debug an issue with Azure IoT edge modules deployed in a transient network environment. The problem is our edge module code sends messages using moduleclient and the call returns successfully. However some messages do not make it to the Azure Iot Hub in the cloud. The devices are often in a disconnected state and we are unsure if the messages are timing out on the upload queue or backing up on the edge hub queue because of lack of bandwidth. Is there anyway to check for edge hub queue depth and failed message count on the IoT edge runtime?
Asked
Active
Viewed 677 times
2 Answers
2
edgeHub exposes some metrics that you can collect and send to Log Analytics (or other tools), including messages received and sent. This might help you.

iamdave
- 12,023
- 3
- 24
- 53

Steve Busby - MSFT
- 283
- 1
- 8
-
1Thanks this is the kind of metrics we were looking for, however is there any metrics for the current queue depth, or to determine if messages timed out before they were able to be sent? We basically want to ensure all messages are eventually delivered to cloud regardless of duration of network issues. And learn when our system should back off queuing new messages. – Dec 18 '19 at 16:18
-
1Unfortunately, no. Those are all the metrics available today. I'm sure engineering will add more over time, but I don't have a list or timing. Those would definitely be useful. You can possibly get queue depth at any point by subtracting outgoing from incoming (which should be either zero or a consistently low number over time), but that might be error prone. Sorry I don't have a better answer – Steve Busby - MSFT Dec 19 '19 at 17:07
-
@SteveBusby-MSFT the link to "List of edgeHub metrics" is dead – Element Apr 05 '20 at 16:08
-
Thanks - apparently the link moved.. new like is here -> https://github.com/Azure/iotedge/blob/master/doc/BuiltInMetrics.md – Steve Busby - MSFT Apr 06 '20 at 17:18
-
`edgehub_queue_length` was added in the 1.0.9 release. It's doc'ed at the link above. – Venkat Yalla Apr 25 '20 at 03:17
0
You may need to debug the communication between the IoT Edge Hub from the IoT Edge Runtime and the IoT Hub or between your module and the IoT Edge Hub. You can find more here: https://learn.microsoft.com/en-us/azure/iot-edge/troubleshoot
From the cloud side (IoT Hub), you can try: https://learn.microsoft.com/en-us/azure/iot-hub/iot-hub-troubleshoot-connectivity

Amicis
- 59
- 1