Background
I'm using Azure-cli
(version >2.3.1) to create IoT Edge deployments:
echo az iot edge deployment create --content $(iotDeploymentPath) --deployment-id $(deploymentId) --hub-name ${hub} --priority $(priority) --target-condition "tags.location.place='$(env)'"
and for getting the metrics:
targetedCount="$(az iot edge deployment show-metric --deployment-id $(deploymentId) --metric-id targetedCount --hub-name ${hub})"
appliedCount="$(az iot edge deployment show-metric --deployment-id $(deploymentId) --metric-id appliedCount --hub-name ${hub})"
reportedSuccessfulCount="$(az iot edge deployment show-metric --deployment-id $(deploymentId) --metric-id reportedSuccessfulCount --hub-name ${hub})"
A few days ago, we got the following error message while trying to receive the deployment's metrics:
the metric 'targetedCount' is not defined in the device configuration $(deploymentId)
the metric 'appliedCount' is not defined in the device configuration $(deploymentId)
the metric 'reportedSuccessfulCount' is not defined in the device configuration $(deploymentId)
with the following depracation message:
This extension 'azure-cli-iot-ext' is deprecated and scheduled for removal. Please remove and add 'azure-iot' instead.
So I've installed 'azure-iot' instead of 'azure-cli-iot-ext', but now it seems like
az iot edge deployment show-metric
stopped working and keeps sending the error message mentioned above.
the metric 'targetedCount' is not defined in the device configuration $(deploymentId)
the metric 'appliedCount' is not defined in the device configuration $(deploymentId)
the metric 'reportedSuccessfulCount' is not defined in the device configuration $(deploymentId)
Question:
How can I get those metrics
back without having the CLI deprecated extanstion version?