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
Copy file name to clipboardExpand all lines: articles/iot-edge/how-to-collect-and-transport-metrics.md
+16-16Lines changed: 16 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ description: Use Azure Monitor to remotely monitor IoT Edge's built-in metrics
4
4
author: veyalla
5
5
6
6
ms.author: veyalla
7
-
ms.date: 03/18/2022
7
+
ms.date: 2/14/2023
8
8
ms.topic: conceptual
9
9
ms.reviewer: kgremban
10
10
ms.service: iot-edge
@@ -17,7 +17,7 @@ services: iot-edge
17
17
18
18
You can remotely monitor your IoT Edge fleet using Azure Monitor and built-in metrics integration. To enable this capability on your device, add the metrics-collector module to your deployment and configure it to collect and transport module metrics to Azure Monitor.
19
19
20
-
To configure monitoring on your IoT Edge device follow the [Tutorial: Monitor IoT Edge devices](tutorial-monitor-with-workbooks.md). You'll learn how to add the metrics-collector module to your device. Otherwise, the information in this article (Collect and transport metrics) gives you an overview of the monitoring architecture and explains options you have for when it's time to configure metrics on your device.
20
+
To configure monitoring on your IoT Edge device, follow the [Tutorial: Monitor IoT Edge devices](tutorial-monitor-with-workbooks.md). You learn how to add the metrics-collector module to your device. This article gives you an overview of the monitoring architecture and explains your options on configuring metrics on your device.
@@ -64,7 +64,7 @@ It also available in the [IoT Edge Module Marketplace](https://aka.ms/edgemon-mo
64
64
65
65
## Metrics collector configuration
66
66
67
-
All configuration for the metrics-collector is done using environment variables. Minimally, the variables noted in the table below marked as **Required** need to be specified.
67
+
All configuration for the metrics-collector is done using environment variables. Minimally, the variables noted in this table marked as **Required** need to be specified.
68
68
69
69
# [IoT Hub](#tab/iothub)
70
70
@@ -76,8 +76,8 @@ All configuration for the metrics-collector is done using environment variables.
76
76
|`LogAnalyticsSharedKey`|[Log Analytics workspace key](../azure-monitor/agents/agent-windows.md#workspace-id-and-key). <br><br>**Required** only if *UploadTarget* is *AzureMonitor* <br><br> Default value: *none*|
77
77
|`ScrapeFrequencyInSecs`| Recurring time interval in seconds at which to collect and transport metrics.<br><br> Example: *600* <br><br> **Not required** <br><br> Default value: *300*|
78
78
|`MetricsEndpointsCSV`| Comma-separated list of endpoints to collect Prometheus metrics from. All module endpoints to collect metrics from must appear in this list.<br><br> Example: *http://edgeAgent:9600/metrics, http://edgeHub:9600/metrics, http://MetricsSpewer:9417/metrics* <br><br> **Not required** <br><br> Default value: *http://edgeHub:9600/metrics, http://edgeAgent:9600/metrics*|
79
-
|`AllowedMetrics`| List of metrics to collect, all other metrics will be ignored. Set to an empty string to disable. For more information, see [allow and disallow lists](#allow-and-disallow-lists). <br><br>Example: *metricToScrape{quantile=0.99}[endpoint=http://MetricsSpewer:9417/metrics]*<br><br> **Not required** <br><br> Default value: *empty*|
80
-
|`BlockedMetrics`| List of metrics to ignore. Overrides *AllowedMetrics*, so a metric won't be reported if it's included in both lists. For more information, see [allow and disallow lists](#allow-and-disallow-lists). <br><br> Example: *metricToIgnore{quantile=0.5}[endpoint=http://VeryNoisyModule:9001/metrics], docker_container_disk_write_bytes*<br><br> **Not required** <br><br>Default value: *empty*|
79
+
|`AllowedMetrics`| List of metrics to collect, all other metrics are ignored. Set to an empty string to disable. For more information, see [allow and disallow lists](#allow-and-disallow-lists). <br><br>Example: *metricToScrape{quantile=0.99}[endpoint=http://MetricsSpewer:9417/metrics]*<br><br> **Not required** <br><br> Default value: *empty*|
80
+
|`BlockedMetrics`| List of metrics to ignore. Overrides *AllowedMetrics*, so a metric isn't reported if it's included in both lists. For more information, see [allow and disallow lists](#allow-and-disallow-lists). <br><br> Example: *metricToIgnore{quantile=0.5}[endpoint=http://VeryNoisyModule:9001/metrics], docker_container_disk_write_bytes*<br><br> **Not required** <br><br>Default value: *empty*|
81
81
|`CompressForUpload`| Controls if compression should be used when uploading metrics. Applies to all upload targets.<br><br> Example: *true* <br><br> **Not required** <br><br> Default value: *true*|
82
82
|`AzureDomain`| Specifies the top-level Azure domain to use when ingesting metrics directly to Log Analytics. <br><br> Example: *azure.us* <br><br> **Not required** <br><br> Default value: *azure.com*|
83
83
@@ -91,8 +91,8 @@ All configuration for the metrics-collector is done using environment variables.
91
91
|`LogAnalyticsSharedKey`|[Log Analytics workspace key](../azure-monitor/agents/agent-windows.md#workspace-id-and-key). <br><br>**Required** only if *UploadTarget* is *AzureMonitor* <br><br> Default value: *none*|
92
92
|`ScrapeFrequencyInSecs`| Recurring time interval in seconds at which to collect and transport metrics.<br><br> Example: *600* <br><br> **Not required** <br><br> Default value: *300*|
93
93
|`MetricsEndpointsCSV`| Comma-separated list of endpoints to collect Prometheus metrics from. All module endpoints to collect metrics from must appear in this list.<br><br> Example: *http://edgeAgent:9600/metrics, http://edgeHub:9600/metrics, http://MetricsSpewer:9417/metrics* <br><br> **Not required** <br><br> Default value: *http://edgeHub:9600/metrics, http://edgeAgent:9600/metrics*|
94
-
|`AllowedMetrics`| List of metrics to collect, all other metrics will be ignored. Set to an empty string to disable. For more information, see [allow and disallow lists](#allow-and-disallow-lists). <br><br>Example: *metricToScrape{quantile=0.99}[endpoint=http://MetricsSpewer:9417/metrics]*<br><br> **Not required** <br><br> Default value: *empty*|
95
-
|`BlockedMetrics`| List of metrics to ignore. Overrides *AllowedMetrics*, so a metric won't be reported if it's included in both lists. For more information, see [allow and disallow lists](#allow-and-disallow-lists). <br><br> Example: *metricToIgnore{quantile=0.5}[endpoint=http://VeryNoisyModule:9001/metrics], docker_container_disk_write_bytes*<br><br> **Not required** <br><br>Default value: *empty*|
94
+
|`AllowedMetrics`| List of metrics to collect, all other metrics are ignored. Set to an empty string to disable. For more information, see [allow and disallow lists](#allow-and-disallow-lists). <br><br>Example: *metricToScrape{quantile=0.99}[endpoint=http://MetricsSpewer:9417/metrics]*<br><br> **Not required** <br><br> Default value: *empty*|
95
+
|`BlockedMetrics`| List of metrics to ignore. Overrides *AllowedMetrics*, so a metric is reported if it's included in both lists. For more information, see [allow and disallow lists](#allow-and-disallow-lists). <br><br> Example: *metricToIgnore{quantile=0.5}[endpoint=http://VeryNoisyModule:9001/metrics], docker_container_disk_write_bytes*<br><br> **Not required** <br><br>Default value: *empty*|
96
96
|`CompressForUpload`| Controls if compression should be used when uploading metrics. Applies to all upload targets.<br><br> Example: *true* <br><br> **Not required** <br><br> Default value: *true*|
97
97
|`AzureDomain`| Specifies the top-level Azure domain to use when ingesting metrics directly to Log Analytics. <br><br> Example: *azure.us* <br><br> **Not required** <br><br> Default value: *azure.com*|
98
98
@@ -114,7 +114,7 @@ The resource ID takes the following format:
114
114
115
115
You can find the resource ID in the **Properties** page of the IoT hub in the Azure portal.
116
116
117
-
:::image type="content" source="./media/how-to-collect-and-transport-metrics/resource-id.png" alt-text="Retrieve resource ID from the IoT Hub properties.":::
117
+
:::image type="content" source="./media/how-to-collect-and-transport-metrics/hub-id.png" alt-text="Screenshot the shows how to retrieve your resource ID from the IoT Hub properties." lightbox="./media/how-to-collect-and-transport-metrics/hub-id.png":::
118
118
119
119
Or, you retrieve the ID with the [az resource show](/cli/azure/resource#az-resource-show) command:
120
120
@@ -198,7 +198,7 @@ If you set **UploadTarget** to **IoTMessage**, then your module metrics are publ
198
198
199
199
### Allow and disallow lists
200
200
201
-
The `AllowedMetrics` and `BlockedMetrics` configuration options take space- or comma-separated lists of metric selectors. A metric will match the list and be included or excluded if it matches one or more metrics in either list.
201
+
The `AllowedMetrics` and `BlockedMetrics` configuration options take space- or comma-separated lists of metric selectors. A metric matches the list and is included or excluded if it matches one or more metrics in either list.
202
202
203
203
Metric selectors use a format similar to a subset of the [PromQL](https://prometheus.io/docs/prometheus/latest/querying/basics/) query language.
204
204
@@ -216,13 +216,13 @@ Metric name (`metricToSelect`).
@@ -263,14 +263,14 @@ Set `NO_PROXY` value to a comma-separated list of hostnames that should be exclu
263
263
264
264
# [IoT Hub](#tab/iothub)
265
265
266
-
Sometimes it's necessary to ingest metrics though IoT Hub instead of sending them directly to Log Analytics. For example, when monitoring [IoT Edge devices in a nested configuration](tutorial-nested-iot-edge.md) where child devices have access only to the IoT Edge hub of their parent device. Another example is when deploying an IoT Edge device with outbound network access only to IoT Hub.
266
+
Sometimes it's necessary to ingest metrics through IoT Hub instead of sending them directly to Log Analytics. For example, when monitoring [IoT Edge devices in a nested configuration](tutorial-nested-iot-edge.md) where child devices have access only to the IoT Edge hub of their parent device. Another example is when deploying an IoT Edge device with *outbound network access only* to IoT Hub.
267
267
268
268
To enable monitoring in this scenario, the metrics-collector module can be configured to send metrics as device-to-cloud (D2C) messages via the edgeHub module. The capability can be turned on by setting the `UploadTarget` environment variable to `IoTMessage` in the collector [configuration](#metrics-collector-configuration).
269
269
270
270
>[!TIP]
271
271
>Remember to add an edgeHub route to deliver metrics messages from the collector module to IoT Hub. It looks like `FROM /messages/modules/replace-with-collector-module-name/* INTO $upstream`.
272
272
273
-
This option does require [extra setup](how-to-collect-and-transport-metrics.md#sample-cloud-workflow) to deliver metrics messages arriving at IoT Hub to the Log Analytics workspace. Without this set up, the other portions of the integration such as [curated visualizations](how-to-explore-curated-visualizations.md) and [alerts](how-to-create-alerts.md)won't work.
273
+
This option does require extra setup, a cloudworkflow, to deliver metrics messages arriving at IoT Hub to the Log Analytics workspace. Without this set up, the other portions of the integration such as [curated visualizations](how-to-explore-curated-visualizations.md) and [alerts](how-to-create-alerts.md)don't work.
274
274
275
275
>[!NOTE]
276
276
>Be aware of additional costs with this option. Metrics messages will count against your IoT Hub message quota. You will also be charged for Log Analytics ingestion and cloud workflow resources.
@@ -281,7 +281,7 @@ A cloud workflow that delivers metrics messages from IoT Hub to Log Analytics is
281
281
282
282
# [IoT Central](#tab/iotcentral)
283
283
284
-
Sometimes it's necessary to ingest metrics though IoT Central instead of sending them directly to Log Analytics. For example, when monitoring [IoT Edge devices in a nested configuration](tutorial-nested-iot-edge.md) where child devices have access only to the IoT Edge hub of their parent device. Another example is when deploying an IoT Edge device with outbound network access only to IoT Central.
284
+
Sometimes it's necessary to ingest metrics through IoT Central instead of sending them directly to Log Analytics. For example, when monitoring [IoT Edge devices in a nested configuration](tutorial-nested-iot-edge.md) where child devices have access only to the IoT Edge hub of their parent device. Another example is when deploying an IoT Edge device with *outbound network access only* to IoT Central.
285
285
286
286
To enable monitoring in this scenario, the metrics-collector module can be configured to send metrics as device-to-cloud (D2C) messages via the edgeHub module. The capability can be turned on by setting the `UploadTarget` environment variable to `IoTMessage` in the collector [configuration](#metrics-collector-configuration).
287
287
@@ -386,11 +386,11 @@ To view the metrics from your IoT Edge device in your IoT Central application:
386
386
387
387
* Add the **IoT Edge Metrics standard interface** as an inherited interface to your [device template](../iot-central/core/concepts-device-templates.md):
388
388
389
-
:::image type="content" source="media/how-to-collect-and-transport-metrics/add-metrics-interface.png" alt-text="Add the IoT Edge Metrics standard interface.":::
389
+
:::image type="content" source="media/how-to-collect-and-transport-metrics/add-metrics-interface.png" alt-text="Screenshot that shows how to add the IoT Edge Metrics standard interface." lightbox="media/how-to-collect-and-transport-metrics/add-metrics-interface.png":::
390
390
391
391
* Use the telemetry values defined in the interface to build any [dashboards](../iot-central/core/howto-manage-dashboards.md) you need to monitor your IoT Edge devices:
392
392
393
-
:::image type="content" source="media/how-to-collect-and-transport-metrics/iot-edge-metrics-telemetry.png" alt-text="IoT Edge metrics available as telemetry.":::
393
+
:::image type="content" source="media/how-to-collect-and-transport-metrics/iot-edge-metrics-telemetry.png" alt-text="Screenshot that shows the IoT Edge metrics available as telemetry." lightbox="media/how-to-collect-and-transport-metrics/iot-edge-metrics-telemetry.png":::
394
394
395
395
>[!NOTE]
396
396
>Be aware of additional costs with this option. Metrics messages will count against your IoT Central message quota.
This article provides end-to-end instructions for autoprovisioning one or more [IoT Edge for Linux on Windows](iot-edge-for-linux-on-windows.md) devices using symmetric keys. You can automatically provision Azure IoT Edge devices with the [Azure IoT Hub device provisioning service](../iot-dps/index.yml) (DPS). If you're unfamiliar with the process of autoprovisioning, review the [provisioning overview](../iot-dps/about-iot-dps.md#provisioning-process) before continuing.
16
+
This article shows how to autoprovision one or more [IoT Edge for Linux on Windows](iot-edge-for-linux-on-windows.md) devices using symmetric keys. You can automatically provision Azure IoT Edge devices with the [Azure IoT Hub device provisioning service](../iot-dps/index.yml) (DPS). If you're unfamiliar with the process of autoprovisioning, review the [provisioning overview](../iot-dps/about-iot-dps.md#provisioning-process) before continuing.
0 commit comments