Skip to content

Commit e07e085

Browse files
Merge pull request #230774 from w-azure/winona-trble
Updated for freshness
2 parents e31f8f8 + a00bbc4 commit e07e085

10 files changed

+21
-17
lines changed
63.9 KB
Loading
-13.2 KB
Loading
32.5 KB
Loading
-82 Bytes
Loading
22.7 KB
Loading
36.3 KB
Loading
42.1 KB
Loading

articles/iot-edge/troubleshoot-in-portal.md

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Use the troubleshooting page in the Azure portal to monitor IoT Edg
44
author: PatAltimore
55

66
ms.author: patricka
7-
ms.date: 05/26/2021
7+
ms.date: 3/15/2023
88
ms.topic: conceptual
99
ms.service: iot-edge
1010
services: iot-edge
@@ -14,56 +14,60 @@ services: iot-edge
1414

1515
[!INCLUDE [iot-edge-version-all-supported](includes/iot-edge-version-all-supported.md)]
1616

17-
IoT Edge provides a streamlined way of monitoring and troubleshooting modules in the Azure portal. The troubleshooting page is a wrapper for the IoT Edge agent's direct methods so that you can easily retrieve logs from deployed modules and remotely restart them.
18-
19-
## Prerequisites
20-
21-
The full functionality of this troubleshooting feature in the portal requires IoT Edge version 1.1.3 or newer if you're on the long-term support branch, or version 1.2.1 or newer if you're on the latest stable branch. Both the IoT Edge host component and the edgeAgent module need to be on these versions.
17+
IoT Edge provides a streamlined way of monitoring and troubleshooting modules in the Azure portal. The troubleshooting page is a wrapper for the IoT Edge agent's direct methods so that you can easily retrieve logs from deployed modules and remotely restart them. This article shows you how to access and filter device and module logs in the Azure portal.
2218

2319
## Access the troubleshooting page
2420

2521
You can access the troubleshooting page in the portal through either the IoT Edge device details page or the IoT Edge module details page.
2622

2723
1. Sign in to the [Azure portal](https://portal.azure.com) and navigate to your IoT hub.
2824

29-
1. In the left pane,select **Devices** under the **Device management** menu.
25+
1. In the left pane, select **Devices** under the **Device management** menu.
3026

3127
1. Select the IoT Edge device that you want to monitor from the list of devices.
3228

33-
1. From the device details page, you can either select **Troubleshoot** from the menu or select the runtime status of a particular module that you want to inspect.
29+
1. On this device details page, you can either select **Troubleshoot** from the menu.
30+
31+
:::image type="content" source="./media/troubleshoot-in-portal/troubleshoot-tab.png" alt-text="Screenshot of the location of the Troubleshoot tab on the Azure portal, device details page.":::
3432

35-
![From the device details page select troubleshoot or a module runtime status](./media/troubleshoot-in-portal/troubleshoot-from-device-details.png)
33+
Or, select the runtime status of a particular module that you want to inspect.
34+
35+
:::image type="content" source="./media/troubleshoot-in-portal/runtime-status.png" alt-text="Screenshot of the location of the Runtime status column on the Azure portal, device details page." lightbox="./media/troubleshoot-in-portal/runtime-status.png":::
3636

3737
1. From the device details page, you can also select the name of a module to open the module details page. From there, you can select **Troubleshoot** from the menu.
3838

39-
![From the module details page select troubleshoot](./media/troubleshoot-in-portal/troubleshoot-from-module-details.png)
39+
:::image type="content" source="./media/troubleshoot-in-portal/troubleshoot-module.png" alt-text="Screenshot of the location of the Troubleshoot tab on the Azure portal, module details page.":::
4040

4141
## View module logs in the portal
4242

43-
On the **Troubleshoot** page, you can view and download logs from any of the running modules on your IoT Edge device.
43+
On the **Troubleshoot** page of your device, you can view and download logs from any of the running modules on your IoT Edge device.
4444

4545
This page has a maximum limit of 1500 log lines, and any logs longer than that will be truncated. If the logs are too large, the attempt to get module logs will fail. In that case, try to change the time range filter to retrieve less data or consider using direct methods to [Retrieve logs from IoT Edge deployments](how-to-retrieve-iot-edge-logs.md) to gather larger log files.
4646

4747
Use the dropdown menu to choose which module to inspect.
4848

49-
![Choose modules from the dropdown menu](./media/troubleshoot-in-portal/select-module.png)
49+
:::image type="content" source="./media/troubleshoot-in-portal/select-module.png" alt-text="Screenshot showing how to choose a module from the dropdown menu that you want to inspect.":::
5050

5151
By default, this page displays the last fifteen minutes of logs. Select the **Time range** filter to see different logs. Use the slider to select a time window within the last 60 minutes, or check **Enter time instead** to choose a specific datetime window.
5252

53-
![Select time range](./media/troubleshoot-in-portal/select-time-range.png)
53+
:::image type="content" source="./media/troubleshoot-in-portal/select-time-range.png" alt-text="Screenshot showing how to choose a time or time range from the time range popup filter.":::
54+
55+
Once you have the logs and set your time filter from the module you want to troubleshoot, you can use the **Find** filter to retrieve specific lines from the logs. You can filter for either warnings or errors, or provide a specific term or phrase to search for.
56+
57+
:::image type="content" source="./media/troubleshoot-in-portal/find-filter.png" alt-text="Screenshot showing how to use a dotnet regex pattern to search the logs, using the Find filter.":::
5458

55-
Once you have the logs from the module that you want to troubleshoot during the time range that you want to inspect, you can use the **Find** filter to retrieve specific lines from the logs. You can filter for either warnings or errors, or provide a specific term or phrase to search for. The **Find** feature supports plaintext searches or [.NET regular expressions](/dotnet/standard/base-types/regular-expression-language-quick-reference) for more complex searches.
59+
The **Find** feature supports plaintext searches or [.NET regular expressions](/dotnet/standard/base-types/regular-expression-language-quick-reference) for more complex searches.
5660

57-
You can download the module logs as a text file. The downloaded log file will reflect any active filters you have applied to the logs.
61+
You can download the module logs as a text file. The downloaded log file reflects any active filters you applied to the logs.
5862

5963
>[!TIP]
60-
>The CPU utilization on a device will spike temporarily as it gathers logs in response to a request from the portal. This behavior is expected, and the utilization should stabilize after the task is complete.
64+
>The CPU utilization on a device spikes temporarily as it gathers logs in response to a request from the portal. This behavior is expected, and the utilization should stabilize after the task is complete.
6165
6266
## Restart modules
6367

6468
The **Troubleshoot** page includes a feature to restart a module. Selecting this option sends a command to the IoT Edge agent to restart the selected module. Restarting a module won't affect your ability to retrieve logs from before the restart.
6569

66-
![Restart a module from the troubleshoot page](./media/troubleshoot-in-portal/restart-module.png)
70+
:::image type="content" source="./media/troubleshoot-in-portal/restart-module.png" alt-text="Screenshot that shows how to restart a module from the Troubleshoot page.":::
6771

6872
## Next steps
6973

0 commit comments

Comments
 (0)