How to monitor the status of IoT Edge Device Offline Mode

Dhanavath Vishnu 366 Reputation points
2023-02-22T16:57:24.7833333+00:00

Hi Team,

I am checking to see if I can track down the disconnectedness of IoT Edge device from associated IoT HUB using an edge module, can this be doable?

My idea of work is, I am running a DB module on my IoT Edge device, I want to re populate this DB Module, whenever the IoT Edge devices goes disconnected mode (offline mode), can I track this offline mode on my IoT Edge device using any environment variable, if so please guide me how can I do?

Thanks

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

Accepted answer
  1. QuantumCache 20,266 Reputation points
    2023-02-22T18:04:15.97+00:00

    Hello Dhanavath Vishnu, Thanks for posting the helpful scenario.

    I personally like to monitor IoT Devices at scale with provided solution reference, below information may be helpful on the adding metrics-collector module to your deployment and configure it to collect and transport module metrics to Azure Monitor. Please note that there are many other solutions which may be suitable for your scenario, but trying the metrics-collector module may be one of them!!!

    Monitor your IoT Edge devices from the cloud

    7 ways new monitoring features help make your IoT Edge project successful

    Collect and transport metrics

    You can remotely monitor your IoT Edge fleet using Azure Monitor and built-in metrics integration. To enable this capability on your device, add the metrics-collector module to your deployment and configure it to collect and transport module metrics to Azure Monitor.

    To configure monitoring on your IoT Edge device, follow the Tutorial: Monitor IoT Edge devices.

    Cloud Workflow: Some of the Architecture flow which you may be interested to explore.

    User's image

    User's image

    User's image

    User's image

    User's image

    User's image

    .

    If you need further help in this matter, please comment in the below section and we are happy to discuss!


    If this answers your query, do click Accept Answer and Yes for this answer as helpful. And, if you have any further query do let us know by commenting in the below section.

    2 people found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Sander van de Velde | MVP 32,391 Reputation points MVP
    2023-02-22T19:17:01.38+00:00

    Hello @Dhanavath Vishnu ,

    if you are interested in device connections/disconnections, the device property is not reliable due to various reasons.

    Please check out the non-telemetry events outputted by the IoT Hub to routing endpoints:

    User's image

    An alternative you can research is using event grid for monitoring the device connection status.


    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.

    1 person found this answer 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.