How to Read Temperature Sensor Data using Azure IoT Metrics Collector Module

Pritam Chanda 20 Reputation points
2024-07-17T05:17:06.35+00:00

I am using a Jetson Orin nano board as an edge device with a simulated temperature sensor module and IoT Metrics Collector module deployed. I would like to know how to collect temperature readings from the simulated sensor module using the metrics collector module and expose them via a port for use with prometheus or node exporter. Is this possible? If so, how can I achieve it?

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.
561 questions
Azure IoT Hub
Azure IoT Hub
An Azure service that enables bidirectional communication between internet of things (IoT) devices and applications.
1,156 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Sander van de Velde | MVP 31,126 Reputation points MVP
    2024-07-17T07:41:01.6566667+00:00

    Hello @Pritam Chanda,

    welcome to this moderated Azure community forum.

    The IoT Metrics collector collect Prometheus metrics exposed by the edgeAgent and edgeHub module. These provide information about the system (eg. memory usage, CPU) and about the modules and the routing.

    The Metrics collector cannot emit Prometheus messages.

    The Metrics collector can receive Prometheus messages from custom modules but you need to write logic to exposed these in your module on a port. The collected messages are then sent to an Azure Log Analytics workspace.

    You can use the same logic, the endpoint in your custom module, to expose you metrics to Prometheus if you run it as a separate container.

    The simulated sensor has no custom logic for this.


    If the response helped, do "Accept Answer". If it doesn't work, please let us know the progress. All community members with similar issues will benefit by doing so. Your contribution is highly appreciated.