Azure IoT Edge Layered deployment Module Image Version Monitoring from Dashboard.

Dhanavath Vishnu 366 Reputation points
2024-02-26T13:13:54.67+00:00

Hello @LeelaRajeshSayana-MSFT we have scenarios, where we are having 4 environments (Dev, QA, Stage, Prod) are setup for our IoT Edge Layered Deployments using the Azure DevOps pipelines. All deployments are running as expected. Now the requirement is, we want to track the module image versions deployed across the environments, on a single dashboard: Example: Dev: Module1:1.9.0 Module2:1.10.0 Module3: 1.13.0 QA Module1: 1.1.0 Module2: 1.2.0 Module3: 1.1.0 Stage Module1: 1.4.0

Module2: 1.6.0

Module3: 1.9.0

Can we get this type of information using CLI or using any query in Azure IoT HUB. If so, please suggest the method to do 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.
576 questions
0 comments No comments
{count} votes

Accepted answer
  1. Sander van de Velde | MVP 33,046 Reputation points MVP
    2024-02-26T18:14:27.8833333+00:00

    Hello @Dhanavath Vishnu ,

    welcome to this moderated Azure community forum.

    It seems you want to get a list of all Azure IoT Hub configurations via code so you can automate the output.

    It seems you can get all configuration using this Rest API call.

    An individual configuration can be extracted using this call.

    The CLI equivalents are this for the list and this for the individual configuration.

    Notice, I tried the "LIST" CLI version but the response was empty. I also checked the same "LIST" command with --debug which showed the underlying REST API calls. There, I could see the actual configurations.

    The "SHOW" CLI command gave me a response for the right layer so that command is working:

    enter image description here

    It's not clear to me why this "LIST" command fails to create a valid response. Hopefully, you are more successful.

    Therefor, I recommend relying on the REST API calls (with the --debug output as an example) because these seem te work alright.

    With those JSON responses, you can build up your own report.


    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.

1 additional answer

Sort by: Most helpful
  1. Dhanavath Vishnu 366 Reputation points
    2024-03-01T14:33:58.5333333+00:00

    Hi @Sander van de Velde | MVP

    Hello @LeelaRajeshSayana-MSFT

    Just I was checking with Azure CLI command for az iot hub configuration, when I enter the following command, I am getting error:

    az iot hub configuration show --hub-name myiothub --config-id mydelpoyment-node --query "content.modulesContent.$edgeAgent"

    error: argument --query: invalid jmespath_type value: 'content.modulesContent.'

    is $edgeAgent passing is right method or I am missing anything here? These seems to be JMESPath query.

    One more thing I want to check, if I want to get image version from the iot edge hub configuration content, how big is my query, can you help me out on this. Thanks & Regards

    D. Vishnu


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.