Skip to content

Commit e43c60d

Browse files
author
Amson Liu
authored
Merge pull request #9305 from amsliu/v-liuamson-CI6473-and-CI6474
Update the articles for CI 6473 and CI 6474. PR approved by JarrettRenshaw.
2 parents 1a719ef + ba9584d commit e43c60d

File tree

2 files changed

+110
-2
lines changed

2 files changed

+110
-2
lines changed

support/azure/azure-monitor/activity-logs/config-export/diagnostic-settings-transition-from-legacy-solutions.md

Lines changed: 76 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,79 @@ ms.custom: I can’t configure export of Activity Logs
88
---
99
# Diagnostic Settings Transition from Legacy Solutions
1010

11-
This article is currently being updated.
11+
## Resolve Transition Issues from Legacy Azure Activity Log Solutions
12+
13+
This article addresses the transition from legacy solutions for forwarding Azure activity logs to new diagnostic settings. The legacy solution will be retired on September 30, 2026, and this change will occur automatically without disrupting your workflow. However, if you have automation using the legacy API, you will need to update it.
14+
15+
### Step-by-Step Instructions to Resolve Transition Issues
16+
17+
1. **Verify Current Configuration**
18+
- Navigate to **Azure Portal**.
19+
- Go to **Monitor** > **Activity Log** > **Export Activity Log**.
20+
- Select your subscription from the dropdown and ensure a diagnostic setting is configured.
21+
22+
2. **Update Automation Scripts**
23+
- If you have scripts using the legacy API, update them to use the **diagnostic settings API** by September 30, 2026.
24+
- Refer to the [Azure Diagnostic Settings API Documentation](https://learn.microsoft.com/azure/azure-monitor/essentials/activity-log?tabs=powershell#legacy-collection-methods) for guidance.
25+
26+
3. **Check Log Analytics Workspace**
27+
- Ensure the destination Log Analytics Workspace is active.
28+
- If the workspace is inactive, change the destination to an active subscription.
29+
30+
4. **Run PowerShell Script to List Diagnostic Settings**
31+
- Open **Azure Cloud Shell** or any PowerShell connected to your tenant.
32+
- Run the following script to list all diagnostic settings across your subscriptions:
33+
34+
```powershell
35+
# Install and login with Connect-AzAccount
36+
If ($null -eq (Get-Command -Name Get-CloudDrive -ErrorAction SilentlyContinue)) {
37+
If ($null -eq (Get-Module Az -ListAvailable -ErrorAction SilentlyContinue)){
38+
Write-Host Installing Az module from default repository
39+
Install-Module -Name Az -AllowClobber
40+
}
41+
Write-Host Importing Az
42+
Import-Module -Name Az
43+
Write-Host Connecting to Az
44+
Connect-AzAccount
45+
}
46+
# Get all Azure Subscriptions
47+
$Subs = Get-AzSubscription
48+
# Set array
49+
$DiagResults = @()
50+
# Loop through all Azure Subscriptions
51+
foreach ($Sub in $Subs) {
52+
Set-AzContext $Sub.id | Out-Null
53+
Write-Host Processing Subscription: ($Sub).name
54+
# Get all Azure resources for current subscription
55+
$Resources = Get-AZResource
56+
# Get all Azure resources which have Diagnostic settings enabled and configured
57+
foreach ($res in $Resources) {
58+
$resId = $res.ResourceId
59+
$DiagSettings = Get-AzDiagnosticSetting -ResourceId $resId -WarningAction SilentlyContinue -ErrorAction SilentlyContinue | Where-Object { $_.Id -ne $null }
60+
foreach ($diag in $DiagSettings) {
61+
# Store all results for resource in PS Object
62+
$item = [PSCustomObject]@{
63+
ResourceName = $res.name
64+
DiagnosticSettingsName = $diag.name
65+
StorageAccountName = $diag.StorageAccountId
66+
EventHubName = $diag.EventHubAuthorizationRuleId
67+
WorkspaceName = $diag.WorkspaceId
68+
Subscription = $Sub.Name
69+
ResourceId = $resId
70+
DiagnosticSettingsId = $diag.Id
71+
}
72+
Write-Host $item
73+
# Add PS Object to array
74+
$DiagResults += $item
75+
}
76+
}
77+
}
78+
# Save Diagnostic settings to CSV as tabular data
79+
$DiagResults | Export-Csv -Force -Path .\AzureResourceDiagnosticSettings-$(get-date -f yyyy-MM-dd-HHmm).csv
80+
```
81+
82+
## Reference
83+
- [Azure Diagnostic Settings Documentation](https://learn.microsoft.com/azure/azure-monitor/essentials/activity-log?tabs=powershell#legacy-collection-methods)
84+
- [Azure Monitor Overview](https://learn.microsoft.com/azure/azure-monitor/overview)
85+
86+
If the issue persists after following the solution steps, please open a support case for further assistance.

support/azure/azure-monitor/activity-logs/config-export/understanding-and-transitioning-from-legacy-to-diagnostic-settings.md

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,37 @@ ms.custom: I can’t configure export of Activity Logs
88
---
99
# Understanding and Transitioning from Legacy to Diagnostic Settings for Azure Activity Logs
1010

11-
This article is currently being updated.
11+
When Azure announced the transition from legacy solutions to diagnostic settings for forwarding activity logs, users received notifications about necessary updates. This article provides guidance on how to manage this transition effectively.
12+
13+
### Introduction
14+
Azure is retiring the legacy solution for forwarding activity logs and replacing it with diagnostic settings. This change is automatic, but users with automation relying on the legacy API need to update their configurations. This guide will help you verify your current setup and make necessary adjustments.
15+
16+
### Step-by-Step Instructions to Transition to Diagnostic Settings
17+
18+
1. **Verify Existing Log Profiles**
19+
- Use the **Get-AzLogProfile** command in Azure PowerShell or the **az monitor log-profiles list** command in Azure CLI to check for existing log profiles.
20+
- If these commands return no results, no legacy log profiles are configured, and no action is needed.
21+
22+
2. **Update Automation Scripts**
23+
- If you have automation scripts using the legacy API, update them to use the diagnostic settings API by September 30, 2026.
24+
- Refer to the [Azure Monitor documentation](https://learn.microsoft.com/azure/azure-monitor/platform/activity-log?tabs=powershell#managing-legacy-log-profiles---retiring) for detailed instructions.
25+
26+
3. **Manual Transition to Diagnostic Settings**
27+
- For users with legacy log profiles, manually transition to diagnostic settings by following the steps outlined in the Azure documentation.
28+
- Ensure all configurations are updated before the retirement date to avoid disruptions.
29+
30+
### Common Issues and Solutions
31+
32+
- **Issue:** Unable to find existing log profiles.
33+
- **Solution:** Ensure you are using the correct commands and have the necessary permissions to access log profiles.
34+
35+
- **Issue:** Automation scripts fail after the transition.
36+
- **Solution:** Double-check that all scripts are updated to use the new diagnostic settings API.
37+
38+
### Reference
39+
40+
- [Azure Monitor Documentation](https://learn.microsoft.com/azure/azure-monitor/platform/activity-log?tabs=powershell#managing-legacy-log-profiles---retiring)
41+
- [Get-AzLogProfile Command](https://learn.microsoft.com/powershell/module/az.monitor/get-azlogprofile?view=azps-14.0.0)
42+
- [Azure CLI Log Profiles](https://learn.microsoft.com/cli/azure/monitor/log-profiles?view=azure-cli-latest#az-monitor-log-profiles-list)
43+
44+
If the issue persists after following the solution steps, please open a support case for further assistance.

0 commit comments

Comments
 (0)