You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Azure IoT Edge provides reporting that lets you monitor real-time information on the modules deployed to your IoT Edge devices. The IoT Hub service retrieves the status from the devices and makes them available to the operator. Monitoring is also important for [deployments made at scale](module-deployment-monitoring.md) that include automatic deployments and layered deployments.
17
+
Azure IoT Edge gives you real-time information about the modules deployed to your IoT Edge devices. The IoT Hub service gets status from the devices and shows it to you. Monitoring is also important for [deployments made at scale](module-deployment-monitoring.md) that include automatic deployments and layered deployments.
19
18
20
-
Both devices and modules have similar data, such as connectivity, so values are obtained according to the device ID or the module ID.
19
+
Devices and modules have similar data, like connectivity, so you get values based on the device ID or module ID.
21
20
22
-
The IoT Hub service collects data reported by device and module twins and provides counts of the various states that devices may have. The IoT Hub service organizes this data into four groups of metrics:
21
+
The IoT Hub service collects data reported by device and module twins and gives you counts of the different states that devices can have. The IoT Hub service organizes this data into four groups of metrics:
23
22
24
23
| Type | Description |
25
24
| --- | ---|
26
-
| Targeted | Shows the IoT Edge devices that match the deployment targeting condition. |
27
-
| Applied | Shows the targeted IoT Edge devices that are not targeted by another deployment of higher priority. |
28
-
| Reporting Success | Shows the IoT Edge devices that have reported that the modules have been deployed successfully. |
29
-
| Reporting Failure | Shows the IoT Edge devices that have reported that one or more modules haven't been deployed successfully. To further investigate the error, connect remotely to those devices and view the log files. |
25
+
| Targeted | Shows IoT Edge devices that match the deployment targeting condition. |
26
+
| Applied | Shows targeted IoT Edge devices that aren't targeted by another deployment with higher priority. |
27
+
| Reporting Success | Shows IoT Edge devices that report the modules are deployed successfully. |
28
+
| Reporting Failure | Shows IoT Edge devices that report one or more modules aren't deployed successfully. To investigate the error, connect remotely to those devices and view the log files. |
30
29
31
-
The IoT Hub service makes this data available for you to monitor in the Azure portal and in the Azure CLI.
30
+
You can monitor this data in the Azure portal or use Azure CLI.
32
31
33
32
## Monitor a deployment in the Azure portal
34
33
35
-
To view the details of a deployment and monitor the devices running it, use the following steps:
34
+
To view deployment details and monitor the devices running it, follow these steps:
36
35
37
-
1. Sign in to the [Azure portal](https://portal.azure.com) and navigate to your IoT Hub.
38
-
1. Select **Configurations + Deployments** under the **Device management** menu.
39
-
1.Inspect the deployment list. For each deployment, you can view the following details:
36
+
1. Sign in to the [Azure portal](https://portal.azure.com), then go to your IoT Hub.
37
+
1. Select **Configurations + Deployments** under **Device management**.
38
+
1.Review the deployment list. For each deployment, you see the following details:
40
39
41
40
| Column | Description |
42
41
| --- | --- |
43
42
| ID | The name of the deployment. |
44
43
| Type | The type of deployment, either **Deployment** or **Layered Deployment**. |
45
-
| Target Condition | The tag used to define targeted devices. |
44
+
| Target Condition | The tag that defines targeted devices. |
46
45
| Priority | The priority number assigned to the deployment. |
47
-
| System metrics | The number of device twins in IoT Hub that match the targeting condition. **Applied**specifies the number of devices that have had the deployment content applied to their module twins in IoT Hub. |
46
+
| System metrics | The number of device twins in IoT Hub that match the targeting condition. **Applied**shows the number of devices that have the deployment content applied to their module twins in IoT Hub. |
48
47
| Device Metrics | The number of IoT Edge devices reporting success or errors from the IoT Edge client runtime. |
49
-
| Custom Metrics | The number of IoT Edge devices reporting data for any metrics that you defined for the deployment. |
50
-
| Created | The timestamp from when the deployment was created. This timestamp is used to break ties when two deployments have the same priority. |
48
+
| Custom Metrics | The number of IoT Edge devices reporting data for any metrics that you define for the deployment. |
49
+
| Created | The timestamp when the deployment is created. This timestamp is used to break ties when two deployments have the same priority. |
51
50
52
-
1. Select the deployment that you want to monitor.
53
-
1. On the **Deployment Details** page, scroll down to the bottom section and select the **Target Condition** tab. Select **View** to list the devices that match the target condition. You can change the condition and also the **Priority**. Select **Save** if you made changes.
51
+
1. Select the deployment you want to monitor.
52
+
1. On the **Deployment Details** page, go to the **Target Condition** tab. Select **View** to list the devices that match the target condition. Change the condition or **Priority** as needed, then select **Save**.
54
53
55
54
:::image type="content" source="./media/how-to-monitor-iot-edge-deployments/target-devices.png" alt-text="Screenshot showing targeted devices for a deployment.":::
56
55
57
-
1. Select the **Metrics** tab. If you choose a metric from the **Select Metric** drop-down, a**View** button appears for you to display the results. You can also select **Edit Metrics** to adjust the criteria for any custom metrics that you have defined. Select **Save** if you made changes.
56
+
1. Select the **Metrics** tab. When you choose a metric from the **Select Metric** drop-down, the**View** button appears so you can display the results. Select **Edit Metrics** to adjust the criteria for any custom metrics you define. Select **Save** if you make changes.
58
57
59
58
:::image type="content" source="./media/how-to-monitor-iot-edge-deployments/deployment-metrics-tab.png" alt-text="Screenshot showing the metrics for a deployment.":::
60
59
61
-
To make changes to your deployment, see [Modify a deployment](how-to-deploy-at-scale.md#modify-a-deployment).
60
+
To change your deployment, see [Modify a deployment](how-to-deploy-at-scale.md#modify-a-deployment).
62
61
63
62
## Monitor a deployment with Azure CLI
64
63
65
-
Use the [az iot edge deployment show](/cli/azure/iot/edge/deployment) command to display the details of a single deployment:
64
+
Use the [az iot edge deployment show](/cli/azure/iot/edge/deployment) command to show the details of a single deployment:
66
65
67
66
```azurecli
68
67
az iot edge deployment show --deployment-id [deployment id] --hub-name [hub name]
69
68
```
70
69
71
-
The deployment show command takes the following parameters:
70
+
The `deployment show` command uses these parameters:
72
71
73
-
***--deployment-id** - The name of the deployment that exists in the IoT hub. Required parameter.
74
-
***--hub-name** - Name of the IoT hub in which the deployment exists. The hub must be in the current subscription. Switch to the desired subscription with the command`az account set -s [subscription name]`
72
+
***--deployment-id** - The name of the deployment in the IoT hub. Required parameter.
73
+
***--hub-name** - The name of the IoT hub where the deployment exists. The hub must be in the current subscription. Switch to the subscription with `az account set -s [subscription name]`
75
74
76
-
Inspect the deployment in the command window. The **metrics** property lists a count for each metric that is evaluated by each hub:
75
+
Check the deployment in the command window. The `metrics` property lists a count for each metric that is evaluated by each hub:
77
76
78
-
***targetedCount** - A system metric that specifies the number of device twins in IoT Hub that match the targeting condition.
79
-
***appliedCount** - A system metric specifies the number of devices that have had the deployment content applied to their module twins in IoT Hub.
80
-
***reportedSuccessfulCount** - A device metric that specifies the number of IoT Edge devices in the deployment reporting success from the IoT Edge client runtime.
81
-
***reportedFailedCount** - A device metric that specifies the number of IoT Edge devices in the deployment reporting failure from the IoT Edge client runtime.
77
+
***targetedCount** - The number of device twins in IoT Hub that match the targeting condition.
78
+
***appliedCount** - The number of devices that have the deployment content applied to their module twins in IoT Hub.
79
+
***reportedSuccessfulCount** - The number of IoT Edge devices in the deployment reporting success from the IoT Edge client runtime.
80
+
***reportedFailedCount** - The number of IoT Edge devices in the deployment reporting failure from the IoT Edge client runtime.
82
81
83
-
You can show a list of device IDs or objects for each of the metrics with the [az iot edge deployment show-metric](/cli/azure/iot/edge/deployment) command:
82
+
Show a list of device IDs or objects for each metric with the [az iot edge deployment show-metric](/cli/azure/iot/edge/deployment) command:
The deployment show-metric command takes the following parameters:
90
-
91
-
***--deployment-id** - The name of the deployment that exists in the IoT hub.
92
-
***--metric-id** - The name of the metric for which you want to see the list of device IDs, for example `reportedFailedCount`.
93
-
***--hub-name** - Name of the IoT hub in which the deployment exists. The hub must be in the current subscription. Switch to the desired subscription with the command `az account set -s [subscription name]`.
88
+
The `deployment show-metric` command uses these parameters:
94
89
90
+
***--deployment-id** - The name of the deployment in the IoT hub.
91
+
***--metric-id** - The name of the metric to show the list of device IDs, for example `reportedFailedCount`.
92
+
***--hub-name** - The name of the IoT hub where the deployment exists. The hub must be in the current subscription. Switch to the subscription with `az account set -s [subscription name]`.
95
93
To make changes to your deployment, see [Modify a deployment](how-to-deploy-cli-at-scale.md#modify-a-deployment).
96
94
97
95
## Next steps
98
96
99
-
Learn how to [monitor module twins](how-to-monitor-module-twins.md), primarily the IoT Edge Agent and IoT Edge Hub runtime modules, for the connectivity and health of your IoT Edge deployments.
97
+
Learn how to [monitor module twins](how-to-monitor-module-twins.md), primarily the IoT Edge Agent and IoT Edge Hub runtime modules, to check the connectivity and health of your IoT Edge deployments.
0 commit comments