Hi @Khandu Shinde Thank you for posting the question here. As Sander pointed, this is a weird issue. It could most likely be caused by failed module deployment. Please try the steps suggested by Sander to figure out which module is causing this behavior.
How to identify such modules whose status is showing error (not running) using Kusto query?
To briefly answer your question, I don't think it is possible to monitor the IoT Edge modules runtime status through logs using Kusto Query. Even though you enable Connections
category under Azure Diagnostics
they will only be able to capture the high level connection status of the IoT Edge device. Meaning if the edgeAgent
module and edgeHub
module stay connected, the device connection status shows as connected in the log level. You would not be able to get more granulated information on your custom modules from the Azure Diagnostics.
To get this information, you can query the IoT device edgeAgent module twin
and look for the custom modules runtimeStatus
property under the reported properties section. This gives you the information on the runtime status of your custom module. Please refer the article Monitor Module Twins for more information on what details can be captured from the module twins and different approaches through which they can be monitored.
Alternatively, you can deploy IoT Edge Metrics Collector module to your IoT Edge devices that lets you remotely monitor how an IoT Edge device or its individual modules are performing. Enabling this module on the devices lets you to monitor the modules through Workbooks from the Azure portal. Please refer the below image for reference
Please refer the article Monitor IoT Edge devices for more information on how to set up and use these metrics.
Hope this helps! Please let us know if you have any additional questions or need further assistance.
If the response helped, please do click Accept Answer and Yes for the answer provided. Doing so would help other community members with similar issue identify the solution. I highly appreciate your contribution to the community.