Send built-in edge metrics to IoT Hub.

Nesher, Yoni 21 Reputation points
2021-04-09T21:59:34.557+00:00

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 Edge
Azure IoT Edge
An Azure service that is used to deploy cloud workloads to run on internet of things (IoT) edge devices via standard containers.
573 questions
Azure IoT Hub
Azure IoT Hub
An Azure service that enables bidirectional communication between internet of things (IoT) devices and applications.
1,189 questions
Azure Event Hubs
Azure Event Hubs
An Azure real-time data ingestion service.
637 questions
{count} votes

Accepted answer
  1. Sander van de Velde | MVP 32,641 Reputation points MVP
    2021-04-10T12:04:58.227+00:00

    Hello @Nesher, Yoni ,

    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.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.