【发布时间】:2020-08-12 11:27:15
【问题描述】:
背景
我正在使用Azure-cli(版本>2.3.1)到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)'"
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})"
几天前,我们在尝试接收部署指标时收到以下错误消息:
指标“targetedCount”未在设备配置中定义 $(deploymentId)
指标“appliedCount”未在设备配置中定义 $(deploymentId)
设备中未定义指标“reportedSuccessfulCount” 配置 $(deploymentId)
带有以下贬损信息:
此扩展“azure-cli-iot-ext”已弃用并计划用于 移动。请删除并添加“azure-iot”。
所以我安装了“azure-iot”而不是“azure-cli-iot-ext”,但现在看起来像
az iot edge deployment show-metric 停止工作并继续发送上述错误消息。
指标“targetedCount”未在设备配置中定义 $(deploymentId)
指标“appliedCount”未在设备配置中定义 $(deploymentId)
设备中未定义指标“reportedSuccessfulCount” 配置 $(deploymentId)
问题:
我怎样才能让那些metrics 回来没有有 CLI 已弃用的扩展版本?
【问题讨论】:
-
当你说
az iot edge deployment show-metric“停止工作”时,你是什么意思?有错误吗? -
我在管道中使用相同的,只是查看了我的日志,一切似乎都在工作。您的管道是否正确传递了
deploymentId参数?该错误看起来好像它无法解析参数。
标签: azure azure-iot-hub azure-cli azure-iot-edge