Ping Azure IoT Edge modules status before communicating with each other

Dhanavath Vishnu 366 Reputation points
2023-10-27T13:51:18.98+00:00

Hi Team,

Hello SatishBoddu-MSFT, @LeelaRajeshSayana-MSFT

I am having a scenario as we have 4 IoT Edge modules which are up and running on Linux VM. Now the idea is, we want to initiate the communication after getting to know of the module status either it is enabled or disabled using the module identity twin document. This we can achieve by calling IoT Hub to get the module twin document.

But can we access this module twin document data on Linux OS, using ping commands between the modules, rather than reaching to the IoT HUB, to get module twin identity document and reading from it.

This method helps us the IoT Edge device can work in offline mode also.

Thank you.

D. Vishnu

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.
543 questions
0 comments No comments
{count} votes

Accepted answer
  1. Sander van de Velde 28,956 Reputation points MVP
    2023-10-27T14:31:25.25+00:00

    Hello Dhanavath Vishnu,

    Enabling and disabling modules is done using the device deployment manifest.

    This manifest is only accessible in the cloud. So modules can only be started and stopped by sending a new deployment manifest.

    Personally, it feels like you are going for a very complex solution.

    There are a number of alternatives:

    • Just try to call the logic on the modules (eg. it's running some service). If the call is not answered, the module is probably offline.
    • Just keep the modules running and make the logic inside it dependable on usage. This makes your modules independent from deployment manifest changes in the cloud.
    • Use the Prometheus functionality offered by the EdgeHub and EdgeAgent. These expose many metrics, including module-related metrics. This is also used by the MetricsCollector .

    Please check out if this works for you.


    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.

    0 comments No comments

0 additional answers

Sort by: Most helpful