|
1 | 1 | ---
|
2 |
| -title: Collect diagnostic logs for Azure Stack HCI |
3 |
| -description: How to collect diagnostic logs and share them with Microsoft. |
| 2 | +title: Collect diagnostic logs for Azure Stack HCI (preview) |
| 3 | +description: Learn how to collect diagnostic logs and share them with Microsoft (preview). |
4 | 4 | author: alkohli
|
5 | 5 | ms.author: alkohli
|
6 | 6 | ms.topic: how-to
|
7 | 7 | ms.service: azure-stack-hci
|
8 |
| -ms.date: 03/19/2024 |
| 8 | +ms.date: 10/28/2024 |
9 | 9 | ---
|
10 | 10 |
|
11 |
| -# Collect diagnostic logs for Azure Stack HCI |
| 11 | +# Collect diagnostic logs for Azure Stack HCI (preview) |
12 | 12 |
|
13 | 13 | [!INCLUDE [applies-to](../../includes/hci-applies-to-23h2.md)]
|
14 | 14 |
|
15 |
| -This article describes how to collect diagnostic logs and send them to Microsoft to help identify and fix any issues with your Azure Stack HCI solution. |
| 15 | +This article describes how to collect diagnostic logs for Azure Stack HCI and send them to Microsoft via the Azure portal or PowerShell. These diagnostic logs help identify and fix any issues with your Azure Stack HCI solution. |
16 | 16 |
|
17 |
| -## On-demand log collection |
| 17 | +[!INCLUDE [important](../../includes/hci-preview.md)] |
18 | 18 |
|
19 |
| -On-demand log collection involves manually collecting and sending diagnostic logs to Microsoft using the `Send-DiagnosticData` cmdlet from any node within the Azure Stack HCI cluster. When you run this cmdlet, the logs are temporarily copied locally. This copy is parsed, sent to Microsoft, and then deleted from your system. Microsoft retains this diagnostic data for up to 30 days and handles it as per the [standard privacy practices](https://privacy.microsoft.com/). |
| 19 | +## About on-demand log collection |
| 20 | + |
| 21 | +On-demand log collection refers to the process of manually gathering and sending diagnostic logs to Microsoft. These logs are stored in the Kusto database, where Microsoft Support can access them to help resolve your reported issues. The collected diagnostic data is retained for up to 30 days and is managed according to Microsoft’s [standard privacy practices](https://privacy.microsoft.com/). |
20 | 22 |
|
21 | 23 | ### When to use on-demand log collection
|
22 | 24 |
|
23 |
| -Here are the scenarios in which you can perform on-demand log collection: |
| 25 | +You can perform on-demand log collection in the following scenarios: |
24 | 26 |
|
25 |
| -- Microsoft Support requests for logs based on an open case. |
26 |
| -- Logs are collected when a cluster is connected and registered. |
27 |
| -- Logs are collected when the Observability components are operational and installed. |
28 |
| -- Logs are collected when a cluster is only partly registered. |
29 |
| -- Logs are collected for issues not related to registration failures. |
| 27 | +- When Microsoft Support requests logs for an open case |
| 28 | +- When a cluster is connected and registered |
| 29 | +- When observability components are operational and installed |
| 30 | +- When a cluster is only partially registered |
| 31 | +- For issues unrelated to registration failures |
30 | 32 |
|
31 |
| -To explore additional log collection methods in Azure Stack HCI and understand when to use them, see [Diagnostics](../concepts/observability.md#diagnostics). |
| 33 | +For more information on other log collection methods in Azure Stack HCI and their appropriate use cases, see [Diagnostics](../concepts/observability.md#diagnostics). |
32 | 34 |
|
33 | 35 | ## Prerequisites
|
34 | 36 |
|
35 | 37 | Before you collect on-demand logs, you must complete the following prerequisites:
|
36 | 38 |
|
37 |
| -- You must have access to an Azure Stack HCI cluster. |
38 |
| -- You must have access to Azure. |
| 39 | +- You must have access to an Azure Stack HCI cluster that is deployed and registered. |
39 | 40 | - You must have installed the `AzureEdgeTelemetryAndDiagnostics` extension to collect telemetry and diagnostics information from your Azure Stack HCI system. For information about the extension, see [Azure Stack HCI telemetry and diagnostics extension overview](../concepts/telemetry-and-diagnostics-overview.md).
|
40 | 41 |
|
41 |
| -## Perform on-demand log collection via PowerShell |
| 42 | +## Collect logs for Azure Stack HCI |
| 43 | + |
| 44 | +You can perform on-demand log collection using any of the following methods: |
| 45 | + |
| 46 | +- **(Recommended) The Azure portal**. Use this method when you want to collect and send logs at the cluster level. |
| 47 | + |
| 48 | +- **PowerShell**. Use this method if you want to collect logs based on specific parameters. You have the option to save logs to an SMB share, send supplementary logs, or send logs for specific roles only. |
| 49 | + |
| 50 | +Keep in mind the following information before you start log collection: |
| 51 | + |
| 52 | +- The time required for log collection depends on the time range you specify. The longer the time range, the more time it'll take for log collection. Therefore, we recommend limiting the time range to only the logs you need. |
| 53 | +- Log collections longer than 24 hours aren't supported. |
| 54 | +- Attempting multiple log collections simultaneously will result in a failure. |
| 55 | + |
| 56 | +### [Azure portal (recommended)](#tab/azureportal) |
| 57 | + |
| 58 | +Follow these steps to collect diagnostic logs for your Azure Stack HCI cluster via the Azure portal: |
| 59 | + |
| 60 | +1. In [the Azure portal](https://portal.azure.com/), go to the Azure Stack HCI cluster resource. |
| 61 | + |
| 62 | +1. In the left pane, under **Settings**, select **Diagnostics and Remote Support**. |
| 63 | + |
| 64 | +1. To collect and send logs now, select **Send logs**. |
| 65 | + |
| 66 | + :::image type="content" source="./media/collect-logs/diagnostics-tab.png" alt-text="Screenshot shows the Send logs button." lightbox="./media/collect-logs/diagnostics-tab.png" ::: |
| 67 | + |
| 68 | +1. In the **Send diagnostic logs to Microsoft** pane, select the **Log start time** and **Log end time**, and then select the **Collect and upload logs** button. |
| 69 | + |
| 70 | + :::image type="content" source="./media/collect-logs/send-logs-pane.png" alt-text="Screenshot shows the Send logs pane." lightbox="./media/collect-logs/send-logs-pane.png" ::: |
| 71 | + |
| 72 | + You get a notification that it can take up to 30 minutes to collect diagnostic logs. |
42 | 73 |
|
43 |
| -You can perform on-demand log collection using PowerShell, the recommended method, or Windows Admin Center in the Azure portal, as described later in this article. |
| 74 | +1. The **Log activity** table shows the status of log collections. For more details on a specific log collection, select the link under **Time collected** and review the details in the **Log detail** pane. If you encounter an issue and need help from Microsoft Support, they might request the **Correlation ID** to locate the logs. |
44 | 75 |
|
45 |
| -Run the `Send-DiagnosticData` cmdlet from any node on your Azure Stack HCI cluster to perform on-demand log collection. |
| 76 | + :::image type="content" source="./media/collect-logs/log-details-pane.png" alt-text="Screenshot shows the Log details pane." lightbox="./media/collect-logs/log-details-pane.png" ::: |
46 | 77 |
|
47 |
| -Here are some important points to consider: |
| 78 | +## [PowerShell](#tab/powershell) |
48 | 79 |
|
49 |
| -- The completion time of the `Send-DiagnosticData` cmdlet varies depending on factors, such as the roles for which logs are being collected, time duration specified, and the number of nodes in your Azure Stack HCI environment. |
| 80 | +To use PowerShell for log collection, run the `Send-DiagnosticData` cmdlet from any node within the Azure Stack HCI cluster. This cmdlet temporarily copies the logs locally. The copied logs are parsed, sent to Microsoft, and then deleted from your system. |
| 81 | + |
| 82 | +Here are some important points to consider when collecting logs using PowerShell: |
| 83 | + |
| 84 | +- The completion time of the `Send-DiagnosticData` cmdlet varies depending on factors, such as the roles for which logs are being collected, the time duration specified, and the number of nodes in your Azure Stack HCI environment. |
50 | 85 | - If you don't specify any parameters, the `Send-DiagnosticData` cmdlet collects data from all nodes for the previous one-hour duration.
|
51 | 86 |
|
52 | 87 | Here's the syntax of `Send-DiagnosticData`:
|
@@ -123,15 +158,15 @@ PS C:\Users\docsuser>
|
123 | 158 |
|
124 | 159 | ### Get a history of log collection
|
125 | 160 |
|
126 |
| -You can get a history of all the log collections that you have performed. This history helps you learn about the kinds of log collections, the sizes of log collections, the times when logs were collected, and the methods of log collection. |
| 161 | +You can get a history of all the log collections that you've performed. This history helps you learn about the kinds of log collections, the sizes of log collections, the times when logs were collected, and the methods of log collection. |
127 | 162 |
|
128 | 163 | To get a history of log collections for the last 90 days, enter:
|
129 | 164 |
|
130 | 165 | ```powershell
|
131 | 166 | Get-LogCollectionHistory
|
132 | 167 | ```
|
133 | 168 |
|
134 |
| -Here's a sample output of the `Get-LogCollectionHistory` cmdlet. Note that the `datetime` parameters are in the UTC timezone. |
| 169 | +Here's a sample output of the `Get-LogCollectionHistory` cmdlet. The `datetime` parameters are in the UTC timezone. |
135 | 170 |
|
136 | 171 | ```output
|
137 | 172 | PS C:\CloudDeployment\logs> Get-LogCollectionHistory
|
@@ -190,34 +225,11 @@ Follow these steps to save logs to a local share:
|
190 | 225 | Send-DiagnosticData -SaveToPath <path to share> -ShareCredential $shareCredential
|
191 | 226 | ```
|
192 | 227 |
|
193 |
| -If you have outbound connectivity from the SMB share where you saved the logs, you can run the following command to send the logs to Microsoft: |
194 |
| - |
195 |
| -```powershell |
196 |
| -Send-DiagnosticData NoLogCollection -SupplementaryLogs <path-to-share> -ShareCredentail $shareCredential |
197 |
| -``` |
198 |
| - |
199 |
| -## Provide required information in a support case |
200 |
| - |
201 |
| -If you encounter an issue and need help from Microsoft Support, they might ask for specific information to locate your logs. |
202 |
| - |
203 |
| -You can obtain this information from either the output of the `Send-DiagnosticData` cmdlet or directly from the problematic page in the Azure portal. |
204 |
| - |
205 |
| -### Provide information from the `Send-DiagnosticData` output |
| 228 | + If you have outbound connectivity from the SMB share where you saved the logs, you can run the following command to send the logs to Microsoft: |
206 | 229 |
|
207 |
| -When you use `Send-DiagnosticData` to collect logs, it also provides key details in its output that you need to share with Microsoft Support. After you collect logs, they're sent to the Kusto database. Microsoft Support can then use the information provided to locate your logs in Kusto and help you in resolving the reported issue. |
208 |
| - |
209 |
| -When requested, share the following information with Microsoft Support. Get this information from the `Send-DiagnosticData` output. |
210 |
| - |
211 |
| -- `AEORegion`: The location where your device is registered. |
212 |
| -- `AEODeviceARMResourceUri`: A unique identifier to locate the resource, for example: `/subscriptions/<subscription GUID>/resourceGroups/<Name of Resource group>/providers/Microsoft.AzureStackHCI/clusters/<Name of Cluster>`. |
213 |
| -- `AEOClusterNodeArcResourceUri`: A unique identifier to locate the ARC resource, for example: `/subscriptions/<subscription GUID>/resourceGroups/<Name of Resource group>/providers/Microsoft.HybridCompute/Machines/<machine name>`. |
214 |
| -- `CorrelationId`: A unique identifier to locate the logs. |
215 |
| - |
216 |
| -### Provide information from the Azure portal page where issue occurs |
217 |
| - |
218 |
| -On the problematic page in the Azure portal, press CTRL+ALT+A to download a diagnostic file with the following information: session ID and the URL. In most cases, this information is sufficient to get Microsoft Support started on troubleshooting. |
219 |
| - |
220 |
| -If you're on any of the Azure Stack HCI blades where you're experiencing issues, the current URI has the resource ID needed to debug the service. |
| 230 | + ```powershell |
| 231 | + Send-DiagnosticData NoLogCollection -SupplementaryLogs <path-to-share> -ShareCredentail $shareCredential |
| 232 | + ``` |
221 | 233 |
|
222 | 234 | ## `Send-DiagnosticData` command reference
|
223 | 235 |
|
|
267 | 279 |
|
268 | 280 | ### CollectSddc
|
269 | 281 |
|
270 |
| -Determines whether to include or exclude software-defined data center (SDDC) logs. By default, SDDC logs are included. Set it to $false if you want to exclude them. For more information about using SDDC diagnostic tools, see [Collect diagnostic data for clusters](./collect-diagnostic-data.md). |
| 282 | +This parameter helps determine whether to include or exclude software-defined data center (SDDC) logs. By default, SDDC logs are included. Set it to $false if you want to exclude them. For more information about using SDDC diagnostic tools, see [Collect diagnostic data for clusters](./collect-diagnostic-data.md). |
271 | 283 |
|
272 | 284 | **Syntax**
|
273 | 285 |
|
@@ -326,7 +338,7 @@ Send-DiagnosticData –SaveToPath <output path>
|
326 | 338 | Send-DiagnosticData –SaveToPath <share path>
|
327 | 339 | ```
|
328 | 340 |
|
329 |
| -If you’re using a share path that is not mapped, you must also use the `-ShareCredential` parameter. |
| 341 | +If you’re using a share path that isn't mapped, you must also use the `-ShareCredential` parameter. |
330 | 342 |
|
331 | 343 | ```powershell
|
332 | 344 | Send-DiagnosticData –SaveToPath <share path> -ShareCredential <credentials for share path>
|
@@ -383,13 +395,13 @@ The SupplementaryLogs parameter allows you to send ad-hoc logs to Microsoft.
|
383 | 395 |
|
384 | 396 | You can use it in the following ways:
|
385 | 397 |
|
386 |
| -With `SaveToPath`. In this scenario, both diagnostic logs and ad-hoc logs are collected and saved to a specified path. |
| 398 | +In this scenario, with `SaveToPath`, both diagnostic logs and ad-hoc logs are collected and saved to a specified path. |
387 | 399 |
|
388 | 400 | ```powershell
|
389 | 401 | Send-DiagnosticData [-SupplementaryLogs <string>] -SaveToPath <path>
|
390 | 402 | ```
|
391 | 403 |
|
392 |
| -With `NoLogCollection`. Here, only ad-hoc logs are collected and sent to Microsoft. No diagnostic logs are collected. |
| 404 | +Here, with `NoLogCollection`, only ad-hoc logs are collected and sent to Microsoft. No diagnostic logs are collected. |
393 | 405 |
|
394 | 406 | ```powershell
|
395 | 407 | Send-DiagnosticData -SupplementaryLogs <string> -NoLogCollection
|
@@ -420,7 +432,7 @@ Send-DiagnosticData –SaveToPath <path> -SupplementaryLogs <path to adhoc logs
|
420 | 432 | With `NoLogCollection`:
|
421 | 433 |
|
422 | 434 | ```powershell
|
423 |
| -Send-DiagnosticData –NoLogCollection –SupplemenatryLogs <path to adhoc logs to collect> |
| 435 | +Send-DiagnosticData –NoLogCollection –SupplementaryLogs <path to adhoc logs to collect> |
424 | 436 | ```
|
425 | 437 |
|
426 | 438 | **Extension version**
|
@@ -520,7 +532,7 @@ Initially accessible across all versions, however, this parameter will eventuall
|
520 | 532 | The SharePath parameter can be used for one of the following purposes:
|
521 | 533 |
|
522 | 534 | - Save diagnostic logs to a share path or output path.
|
523 |
| -- Send logs to Microsoft from a share path or output path. If you're using a share path and the share path is not mapped, then the `ShareCredential` parameter must also be used. |
| 535 | +- Send logs to Microsoft from a share path or output path. If you're using a share path and the share path isn't mapped, then the `ShareCredential` parameter must also be used. |
524 | 536 |
|
525 | 537 | Since this parameter will be removed in future versions of the extension, use the `–SaveToPath` to save logs to a path, or `–SupplementaryLogs` when sending ad-hoc logs to Microsoft instead.
|
526 | 538 |
|
@@ -576,26 +588,42 @@ The following roles are available for filtering by the **FilterByRole** paramete
|
576 | 588 | | HostNetwork | Logs used to troubleshoot Network ATC, the underlying operating system component used to configure host networking. |
|
577 | 589 | | MOC_ARB | Management stack that enables cloud-based management of virtual machines on Azure Stack HCI and Windows Server. |
|
578 | 590 | | NC | Information related to the network infrastructure. |
|
579 |
| -| ObservabilityLogmanTraces | Collects logs for Observability traces. These logs help with troubleshooting issues with sending diagnostic data. | |
580 |
| -| ObservabilityVolume | Collects logs for Observability volume. | |
| 591 | +| ObservabilityLogmanTraces | Collects logs for the observability traces. These logs help with troubleshooting issues with sending diagnostic data. | |
| 592 | +| ObservabilityVolume | Collects logs for the observability volume. | |
581 | 593 | | OEMDiagnostics | Collects logs for OEM diagnostics, which can help to identify and resolve issues with your server hardware, such as BIOS, drivers, sensors, and more. |
|
582 | 594 | | OSUpdateLogs | Role that collects logs related to operating system updates on Azure Stack HCI nodes, useful for troubleshooting update-related issues. |
|
583 | 595 | | RemoteSupportAgent | Logs that help troubleshoot issues with remote support sessions, which are used to address customer support cases. |
|
584 | 596 | | TestObservability | Collects logs from the `Test-Observability` cmdlet, which is used to test that the `TelemetryAndDiagnostics` extension is working properly. |
|
585 | 597 | | URP | Consists of logs related to the `UpdateService` and `OsUpdate` ECE role events. The `Update Service` manages updates for Azure Stack HCI systems. The `OsUpdate` ECE role is used to acquire and install operating system updates on machines (physical hosts and InfraVMs) which aren't part of the cluster during the deployment, add node, repair node, and Infra VMs update scenarios. Traces from these two components are part of the `URP` role. |
|
586 | 598 |
|
587 |
| -## Perform on-demand log collection via Windows Admin Center in the Azure portal |
| 599 | +--- |
| 600 | + |
| 601 | +## Provide required information in a support case |
| 602 | + |
| 603 | +If you encounter an issue and need help from Microsoft Support, they might ask for specific information to locate your logs. |
| 604 | + |
| 605 | +### [Azure portal](#tab/azureportal) |
| 606 | + |
| 607 | +Follow these steps to provide the required information in the Azure portal: |
| 608 | + |
| 609 | +1. In the **Diagnostics** tab, under **Log activity**, select the link under **Time collected** for the relevant log collection. |
| 610 | + |
| 611 | +1. In the **Log detail** pane, note the value of **Correlation ID**, and share it with Microsoft Support for troubleshooting purposes. |
| 612 | + |
| 613 | + :::image type="content" source="./media/collect-logs/log-details-pane.png" alt-text="Screenshot shows the Log details pane." lightbox="./media/collect-logs/log-details-pane.png" ::: |
| 614 | + |
| 615 | +### [PowerShell](#tab/powershell) |
588 | 616 |
|
589 |
| -The `Diagnostics` extension in Windows Admin Center in the Azure portal enables you to perform on-demand log collection and share the logs with Microsoft. |
| 617 | +When you use `Send-DiagnosticData` to collect logs, it also provides key details in its output that you need to share with Microsoft Support. After you collect logs, they're sent to the Kusto database. Microsoft Support can then use the information provided to locate your logs in Kusto and help you in resolving the reported issue. |
590 | 618 |
|
591 |
| -Follow these steps to perform on-demand log collection via Windows Admin Center in the Azure portal: |
| 619 | +When requested, share the following information with Microsoft Support. Get this information from the `Send-DiagnosticData` output. |
592 | 620 |
|
593 |
| -1. Connect to Windows Admin Center in the Azure portal. For information, see [Manage Azure Stack HCI clusters using Windows Admin Center in Azure](/windows-server/manage/windows-admin-center/azure/manage-hci-clusters). |
594 |
| -1. In the left pane, under **Extensions**, select **Diagnostics**. |
595 |
| -1. On the **Diagnostics** page, under **Log activity** review log collection history or select a row to show the details about a specific log collection. |
596 |
| -1. Select **Send manually**. In the context pane on the right, enter the log start and end time and then select **Collect & upload logs**. |
| 621 | +- `AEORegion`: The location where your device is registered. |
| 622 | +- `AEODeviceARMResourceUri`: A unique identifier to locate the resource, for example: `/subscriptions/<subscription GUID>/resourceGroups/<Name of Resource group>/providers/Microsoft.AzureStackHCI/clusters/<Name of Cluster>`. |
| 623 | +- `AEOClusterNodeArcResourceUri`: A unique identifier to locate the ARC resource, for example: `/subscriptions/<subscription GUID>/resourceGroups/<Name of Resource group>/providers/Microsoft.HybridCompute/Machines/<machine name>`. |
| 624 | +- `CorrelationId`: A unique identifier to locate the logs. |
597 | 625 |
|
598 |
| - :::image type="content" source="./media/collect-logs/send-logs-manually.png" alt-text="Screenshot of the Diagnostics page showing the Send manually button for on-demand log collection." lightbox="./media/collect-logs/send-logs-manually.png" ::: |
| 626 | +--- |
599 | 627 |
|
600 | 628 | ## Next steps
|
601 | 629 |
|
|
0 commit comments