Azure IoT Edge Deployment metrics partially incorrect

FriedrichJoachim 5 Reputation points
2023-06-27T11:20:03.99+00:00

The Azure Portals view of the IoT Hub has a sub view about the "IoT Edge Deployments" (or newly "Configurations + Deployments") . This view shows the system, device and custom metrics, among other information. There are two points that confuse me:

    1. The "System Metrics" column shows the targeted and applied count of a deployment to devices/a device. However, at some deployments a wrong targeted and applied count is shown. When I click on such a deployment and switch to the "Metrics" tab a column is listed named "Calculated total" . What does this value mean and why is "Current Total" (click on "details") different from that value or in other words, what does "Current Total" mean. In fact, this is the correct value.
  1. The second point I am struggling with is that the custom metric is not calculated correctly. I'm not sure if it has the same root cause as in point 1. Anyhow, the problem is that the query (two conditions combined with a logical AND) ends always with an empty result. When I split up the query into two queries, I get the expected result twice. Look at this example: Query with empty result:
select deviceId from devices.modules where moduleId = 'my-module' and configurations.[[my-deployment-id]].status = 'Applied'

Split condition into two queries:

select deviceId from devices.modules where moduleId = 'my-module'
select deviceId from devices.modules where configurations.[[my-deployment-id]].status = 'Applied'

Both queries have the same result. Why is the combined query's result empty? I am sure that the query was working properly in the past. Did here anything changed?

Thank you very much for your replies.

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

1 answer

Sort by: Most helpful
  1. LeelaRajeshSayana-MSFT 17,866 Reputation points Moderator
    2023-06-27T21:20:51.2966667+00:00

    Hi @FriedrichJoachim Greetings! Welcome to Microsoft Q&A forum. Thank you for posting this question here. We are looking into this issue and get back to you with more findings on this. Please stay tuned for updates.

    However, at some deployments a wrong targeted and applied count is shown

    Can you elaborate a bit on this statement? The value appearing next to Targeted in the System Metrics is determined by the Target Condition defined in the Deployment. You can click View devices under the target condition to see how many devices the deployment targets. Both these values should match. Refer the below image for more details.

    User's image

    Please let us know if you see any issues with this.

    The Targeted device and applied device count on symmetric metrics could vary if the deployment failed on any of the targeted devices. You may notice that some of the targeted devices may not have this deployment applied which results in a difference in Applied and Targeted values.

    What does this value mean and why is "Current Total" (click on "details") different from that value or in other words, what does "Current Total"

    The calculated total is determined by the Target condition of the deployment manifest when created. I believe the Current Total value reflects the count of devices which met the appropriate condition during the deployment is in progress. For example, if the deployment targets 10 devices during the creation, the calculated total remains 10, but the current total for applied metric reflects the current value of the of the deployment status. It is a way of monitoring the deployment status through portal.

    I have tested the query you have referred, and I could get the result as expected. Please find the below images for reference.

    User's image

    User's image

    User's image

    Fetch the entire module with select * and see if the modules returned with the matching module Id has the deployment status as applied to it. You should see something similar to this in the module returned.

    User's image

    Hope this helps. Please let us know if you notice the correct deployment status in the returned module and yet do not see any result when combining the query.


    If the response helped, please do click Accept Answer and Yes. Doing so would help other community members with similar issue identify the solution. I highly appreciate your contribution to the community.


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.