Reputation: 59
I have an Azure Iot Hub setup with a few devices and a Java service connected. I would like to be able to retrieve the traffic statistics (i.e. number of device to cloud messages in a particular time window).
The Azure portal is able to display the overall traffic data (but not on a per device basis), but I haven't found any way of accessing that data, nor seeing a breakdown of the traffic for each device on the portal.
I've looked into the REST API that Azure supports, including the Java Azure SDK, but couldn't find anything relating to IoT network traffic.
Upvotes: 0
Views: 229
Reputation: 18
Azure IoT Hub's metrics (the data you see on the portal) cannot be broken down to a device level directly. To get traffic statistics for a device or a set of devices, you would need to set up an additional service to consume and count the messages. One way to do it is to use Azure Stream Analytics and count up the messages using the IoTHub.ConnectionDeviceId
field.
Upvotes: 0