question

NesherYoni-0369 avatar image
0 Votes"
NesherYoni-0369 asked asergaz commented

Send built-in edge metrics to IoT Hub.

I want to send certain built-in runtime telemetries that edge devices generate to that edge's IoT Hub and receive those telemetries using the EventHubs SDK. Specifically I need edgeAgent_used_cpu_percent and edgeAgent_used_memory_bytes which, according to this page are provided by the edgeAgent. As well, according to this page "metrics collected for runtime quality telemetry are labeled with the tag ms_telemetry". I'm not sure what to do with this information when making the route, and would appreciate if someone could respond with an online quickstart or a step-by-step on how to properly do this.


azure-iot-hubazure-iot-edgeazure-event-hubs
· 1
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.

Hello @NesherYoni-0369 ,
Please share with us if you have any other questions related with your original post. Otherwise could you go ahead and mark the below as answer?

Thank you so much.

Remember:
- Please accept an answer if correct. Original posters help the community find answers faster by identifying the correct answer. Here is how.

0 Votes 0 ·

1 Answer

SandervandeVelde42 avatar image
1 Vote"
SandervandeVelde42 answered

Hello @NesherYoni-0369 ,

these metrics are available for you indeed.

Follow this guide to get the values. Here I send the metrics back on the IoT Edge routing mechanism as regular IoT Hub messages.

It should be fairly simple to send the messages to a public EventHub endpoint.

You can either rewrite the logic to send it to the EventHub directly or you create an extra module where you filter or aggregate the messages first.

The source code is available on GitHub.


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.