question

Johannes-1047 avatar image
0 Votes"
Johannes-1047 asked SatishBoddu-MSFT commented

How to monitor metrics for IoT Hub built-in Event Hub (e.g. outgoing messages)?

I wanted to monitor outgoing messages for the IoT Hub built-in Event Hub but I seem there is no possibility to access this metric.

There are some metrics which give some insight. For example "Routing: messages delivered to messages/events" (namespace: microsoft.devices/iothubs, metricID: d2c.endpoints.egress.builtIn.events) which shows number of messages send to built-in Event Hub. But I cannot see outgoing messages for this built-in Event Hub.

If I use Event Hubs directly I can monitor this metric (namespace: microsoft.eventhub/namespaces, metricID: OutgoingMessages) plus Event Hub specific metrics.

How can I monitor outgoing messages for the IoT Hub built-in Event Hub (without first forwarding to an Event Hub)?

azure-iot-hubazure-event-hubs
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @SatishBoddu-MSFT,

right now I want to monitor outgoing messages for the IoT Hub built-in Event Hub (i.e. how many messages are consumed from the Event Hub over all consumer groups combined)

On a "real" Event Hub I do have the option to monitor this (namespace: microsoft.eventhub/namespaces, metricID: OutgoingMessages). The IoT Hub built-in Event Hub seems to not allow to monitor this number though.

1 Vote 1 ·

Hello @Johannes-1047

What metric exactly do you want to track\monitor from IoTHub? is it the number of messages ? or any other system specific metrics?

I hope these documents will help with your initial query.

Trace Azure IoT device-to-cloud messages with distributed tracing (preview)

Microsoft Azure IoT Hub currently supports distributed tracing as a preview feature as of now.


Tutorial: Set up and use metrics and logs with an IoT hub


Metrics:

IoT Hub egress logs



Also please refer to the: edge-telegraf-monitor
Visualize and monitor IoT Edge module docker metrics in Azure Monitor using telegraf.


[5]: /answers/storage/attachments/177218-image.png


0 Votes 0 ·
image.png (93.5 KiB)

1 Answer

SatishBoddu-MSFT avatar image
0 Votes"
SatishBoddu-MSFT answered SatishBoddu-MSFT commented

Hello @Johannes-1047

Have you tried the Azure Monitor: metrics: Microsoft.Devices/IotHubs, let us know if you need further help in this matter!
There are more metrics on this document, please have a look, if they might help with your query.

c2d.commands.egress.complete.success-->C2D message deliveries completed--Count--Total--Number of cloud-to-device message deliveries completed successfully by the device


177620-image.png


image.png (17.2 KiB)
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @SatishBoddu-MSFT

I checked the available metrics but I'm not able to find metrics for outgoing messages on the built-in event hub.

c2d.commands.egress.complete.success-->C2D message deliveries completed--Count--Total--Number of cloud-to-device message deliveries completed successfully by the device

This does not show any outgoing messages for me. This is expected as I'm not sending messages from Cloud to Device.

I am sending messages from IoTHub to built-in Event Hub though (namespace: microsoft.devices/iothubs, metricID: d2c.endpoints.egress.builtIn.events). I'm missing monitoring on how many messages are consumed from this built-in Event Hub.

0 Votes 0 ·

Hello @Johannes-1047

You may be interested in the preview feature of Trace Azure IoT device-to-cloud messages with distributed tracing (preview), you'll be able to trace IoT messages throughout the Azure services involved in your solution. For background on distributed tracing, see Distributed Tracing.

One of the best reference solutions I have seen recently on this thread responded by Microsoft's MVP-IoT Industry leader- @SandervandeVelde42
How to get a count of all telemetry messages currently available ?

Also, refer to the Stack Overflow response by our SME @asergaz : In Azure IoT Hub, how can I find daily quota usage (Device to Cloud Telemetry) used by each device IDs?

Tutorial: Set up and use metrics and logs with an IoT hub

179487-image.png


0 Votes 0 ·
image.png (42.2 KiB)