Skip to content

Commit 3a18ffc

Browse files
authored
Merge pull request #15088 from ManikaDhiman/md-collect-logs-portal
Collect log via the Azure portal
2 parents caff31a + 705bf8c commit 3a18ffc

File tree

5 files changed

+94
-66
lines changed

5 files changed

+94
-66
lines changed

azure-stack/hci/manage/collect-logs.md

Lines changed: 94 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,87 @@
11
---
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).
44
author: alkohli
55
ms.author: alkohli
66
ms.topic: how-to
77
ms.service: azure-stack-hci
8-
ms.date: 03/19/2024
8+
ms.date: 10/28/2024
99
---
1010

11-
# Collect diagnostic logs for Azure Stack HCI
11+
# Collect diagnostic logs for Azure Stack HCI (preview)
1212

1313
[!INCLUDE [applies-to](../../includes/hci-applies-to-23h2.md)]
1414

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.
1616

17-
## On-demand log collection
17+
[!INCLUDE [important](../../includes/hci-preview.md)]
1818

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/).
2022

2123
### When to use on-demand log collection
2224

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:
2426

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
3032

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).
3234

3335
## Prerequisites
3436

3537
Before you collect on-demand logs, you must complete the following prerequisites:
3638

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.
3940
- 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).
4041

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.
4273

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.
4475

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" :::
4677

47-
Here are some important points to consider:
78+
## [PowerShell](#tab/powershell)
4879

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.
5085
- If you don't specify any parameters, the `Send-DiagnosticData` cmdlet collects data from all nodes for the previous one-hour duration.
5186

5287
Here's the syntax of `Send-DiagnosticData`:
@@ -123,15 +158,15 @@ PS C:\Users\docsuser>
123158

124159
### Get a history of log collection
125160

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.
127162

128163
To get a history of log collections for the last 90 days, enter:
129164

130165
```powershell
131166
Get-LogCollectionHistory  
132167
```
133168

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.
135170

136171
```output
137172
PS C:\CloudDeployment\logs> Get-LogCollectionHistory
@@ -190,34 +225,11 @@ Follow these steps to save logs to a local share:
190225
Send-DiagnosticData -SaveToPath <path to share> -ShareCredential $shareCredential
191226
```
192227

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:
206229

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+
```
221233

222234
## `Send-DiagnosticData` command reference
223235

@@ -267,7 +279,7 @@ All
267279

268280
### CollectSddc
269281

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).
271283

272284
**Syntax**
273285

@@ -326,7 +338,7 @@ Send-DiagnosticData –SaveToPath <output path>
326338
Send-DiagnosticData –SaveToPath <share path>
327339
```
328340

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.
330342

331343
```powershell
332344
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.
383395

384396
You can use it in the following ways:
385397

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.
387399

388400
```powershell
389401
Send-DiagnosticData [-SupplementaryLogs <string>] -SaveToPath <path>
390402
```
391403

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.
393405

394406
```powershell
395407
Send-DiagnosticData -SupplementaryLogs <string> -NoLogCollection
@@ -420,7 +432,7 @@ Send-DiagnosticData –SaveToPath <path> -SupplementaryLogs <path to adhoc logs
420432
With `NoLogCollection`:
421433

422434
```powershell
423-
Send-DiagnosticData –NoLogCollection –SupplemenatryLogs <path to adhoc logs to collect>
435+
Send-DiagnosticData –NoLogCollection –SupplementaryLogs <path to adhoc logs to collect>
424436
```
425437

426438
**Extension version**
@@ -520,7 +532,7 @@ Initially accessible across all versions, however, this parameter will eventuall
520532
The SharePath parameter can be used for one of the following purposes:
521533

522534
- 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.
524536

525537
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.
526538

@@ -576,26 +588,42 @@ The following roles are available for filtering by the **FilterByRole** paramete
576588
| HostNetwork | Logs used to troubleshoot Network ATC, the underlying operating system component used to configure host networking. |
577589
| MOC_ARB | Management stack that enables cloud-based management of virtual machines on Azure Stack HCI and Windows Server. |
578590
| 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. |
581593
| 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. |
582594
| OSUpdateLogs | Role that collects logs related to operating system updates on Azure Stack HCI nodes, useful for troubleshooting update-related issues. |
583595
| RemoteSupportAgent | Logs that help troubleshoot issues with remote support sessions, which are used to address customer support cases. |
584596
| TestObservability | Collects logs from the `Test-Observability` cmdlet, which is used to test that the `TelemetryAndDiagnostics` extension is working properly. |
585597
| 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. |
586598

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)
588616

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.
590618

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.
592620

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.
597625

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+
---
599627

600628
## Next steps
601629

279 KB
Loading
327 KB
Loading
Binary file not shown.
363 KB
Loading

0 commit comments

Comments
 (0)