Skip to content

Commit 93b5a46

Browse files
author
Amson Liu
authored
Merge branch 'main' into v-liuamson-CI6612
2 parents 5beb6bb + fec9e90 commit 93b5a46

File tree

4 files changed

+113
-15
lines changed

4 files changed

+113
-15
lines changed
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
---
2+
title: Centralized Configuration of Activity Logs to Event Hubs
3+
description: Provides guidance to set up Azure Activity Logs to be centrally exported to a single Event Hub.
4+
ms.date: 07/22/2025
5+
ms.reviewer: v-liuamson; v-gsitser
6+
ms.service: azure-monitor
7+
ms.custom: I can’t configure export of Activity Logs
8+
---
9+
10+
# Centralized Configuration of Activity Logs to Event Hubs
11+
12+
## Introduction
13+
14+
This article provides guidance for setting up Azure Activity Logs to be centrally exported to a single hub in Azure Event Hubs. This setup is useful for organizations that want to streamline log management across multiple Azure subscriptions and forward logs to third-party SIEM solutions.
15+
16+
Organizations often require a centralized approach to manage Activity Logs across numerous subscriptions. This guide discusses common challenges and considerations for configuring Azure Policies to automate streaming these logs to a specified event hub.
17+
18+
## Instructions to configure Activity Logs
19+
20+
1. **Create an Azure Policy for Activity Logs:**
21+
- Navigate to the Azure portal, and access the **Azure Policy** service.
22+
- Create a policy definition by using the JSON file that's provided in the community example. This policy should automate the enablement of activity log diagnostic settings across all subscriptions under a management group.
23+
24+
2. **Assign the Policy to Management Group:**
25+
- Assign the newly created policy to the desired management group that contains the required subscriptions.
26+
- Make sure that the policy is set to send data to the specified Event Hub.
27+
28+
3. **Configure Log Analytics Workspace:**
29+
- Access **Log Analytics Workspace** in the Azure portal.
30+
- Set up data export rules to forward logs from the Log Analytics Workspace to the event hub. Specify the source table as `AzureActivity` and the destination as the central event hub.
31+
32+
4. **Verify event hub configuration:**
33+
- Make sure that the event hub is configured to handle the expected log volume from all subscriptions.
34+
- Review performance benchmarks and adjust the event hub tier if it's necessary to manage logs efficiently.
35+
36+
5. **Monitor and adjust:**
37+
- Regularly monitor the event hub performance and log flow.
38+
- Adjust configurations as necessary to optimize performance and cost.
39+
40+
## Common issues and solutions
41+
42+
- **Performance concerns:** If the event hub experiences difficulty in handling the log volume, consider upgrading the tier or distributing logs across multiple hubs.
43+
- **Policy Limitations:** Azure Policy might require manual steps for each subscription. Make sure that all configurations are correctly applied.
44+
45+
## Reference
46+
47+
- [Azure Policy Assignment to Enable Activity Log on Subscription](/azure/policy-assignment-to-enable-activity-log-on-subscription)
48+
- [Azure Event Hubs Overview](/azure/event-hubs/event-hubs-about)
49+
50+
If the issue persists after you follow these steps, open a support case for further assistance.
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
title: Troubleshoot Azure CLI Configuration Issues
3+
description: Troubleshooting guide for Azure CLI configuration issues.
4+
ms.date: 07/22/2025
5+
ms.reviewer: v-liuamson; v-gsitser
6+
ms.service: azure-monitor
7+
ms.custom: I can’t configure export of activity logs
8+
---
9+
10+
# Troubleshoot Azure CLI configuration issues
11+
12+
This article discusses issues that are related to configuring Microsoft Azure to export activity logs by using PowerShell or CLI. Because of missing proxy certificates, users might experience difficulties when they try to run PowerShell commands.
13+
14+
## Common issues and solutions
15+
16+
- **Issue:** PowerShell commands don't run.
17+
- **Root Cause:** Missing proxy certificates that are required for command execution.
18+
19+
### Instructions to resolve configuration issues
20+
21+
1. **Verify proxy settings:**
22+
- Navigate to the **Network & Internet** settings on your system.
23+
- Make sure that the proxy settings are configured correctly to allow PowerShell access.
24+
25+
2. **Install proxy certificates:**
26+
- Download the necessary proxy certificates from your network administrator.
27+
- Open the **Certificates Manager** snap-in by typing `certmgr.msc` in the Windows search bar.
28+
- Import the downloaded certificates into the **Trusted Root Certification Authorities** store.
29+
30+
3. **Test PowerShell command execution:**
31+
- Open PowerShell and run a test command to check whether the issue is resolved.
32+
- Example command: `Get-AzActivityLog -MaxRecord 5`.
33+
34+
4. **Check Azure CLI configuration:**
35+
- Run `az upgrade` to verify that the Azure CLI is updated to the latest version.
36+
- Run `az configure` to verify that the CLI is configured correctly.
37+
38+
## References
39+
40+
- [Azure CLI Documentation](/azure/cli/)
41+
- [PowerShell Documentation](/powershell/)
42+
- [Azure Activity Logs Overview](/azure/azure-monitor/essentials/activity-log)
43+
44+
If the issue persists after you follow these steps, open a support case for further assistance.
Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Understanding and Transitioning from Legacy to Diagnostic Settings for Activity Logs
33
description: Provides step-by-step instructions to transition from legacy to diagnostic settings.
4-
ms.date: 07/16/2025
4+
ms.date: 07/22/2025
55
ms.reviewer: v-liuamson; v-gsitser
66
ms.service: azure-monitor
77
ms.custom: I can’t configure export of Activity Logs
@@ -11,9 +11,17 @@ ms.custom: I can’t configure export of Activity Logs
1111

1212
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.
1313

14-
### Introduction
14+
## Introduction
1515
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.
1616

17+
## Common Issues and Solutions
18+
19+
- **Issue:** Unable to find existing log profiles.
20+
- **Solution:** Ensure you are using the correct commands and have the necessary permissions to access log profiles.
21+
22+
- **Issue:** Automation scripts fail after the transition.
23+
- **Solution:** Double-check that all scripts are updated to use the new diagnostic settings API.
24+
1725
### Step-by-Step Instructions to Transition to Diagnostic Settings
1826

1927
1. **Verify Existing Log Profiles**
@@ -22,24 +30,16 @@ Azure is retiring the legacy solution for forwarding activity logs and replacing
2230

2331
2. **Update Automation Scripts**
2432
- If you have automation scripts using the legacy API, update them to use the diagnostic settings API by September 30, 2026.
25-
- 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.
33+
- Refer to the [Azure Monitor documentation](/azure/azure-monitor/platform/activity-log?tabs=powershell#managing-legacy-log-profiles---retiring) for detailed instructions.
2634

2735
3. **Manual Transition to Diagnostic Settings**
2836
- For users with legacy log profiles, manually transition to diagnostic settings by following the steps outlined in the Azure documentation.
2937
- Ensure all configurations are updated before the retirement date to avoid disruptions.
3038

31-
### Common Issues and Solutions
32-
33-
- **Issue:** Unable to find existing log profiles.
34-
- **Solution:** Ensure you are using the correct commands and have the necessary permissions to access log profiles.
35-
36-
- **Issue:** Automation scripts fail after the transition.
37-
- **Solution:** Double-check that all scripts are updated to use the new diagnostic settings API.
38-
39-
### Reference
39+
## Reference
4040

41-
- [Azure Monitor Documentation](https://learn.microsoft.com/azure/azure-monitor/platform/activity-log?tabs=powershell#managing-legacy-log-profiles---retiring)
42-
- [Get-AzLogProfile Command](https://learn.microsoft.com/powershell/module/az.monitor/get-azlogprofile?view=azps-14.0.0)
43-
- [Azure CLI Log Profiles](https://learn.microsoft.com/cli/azure/monitor/log-profiles?view=azure-cli-latest#az-monitor-log-profiles-list)
41+
- [Azure Monitor Documentation](/azure/azure-monitor/platform/activity-log?tabs=powershell#managing-legacy-log-profiles---retiring)
42+
- [Get-AzLogProfile Command](/powershell/module/az.monitor/get-azlogprofile?view=azps-14.0.0&preserve-view=true)
43+
- [Azure CLI Log Profiles](/cli/azure/monitor/log-profiles?view=azure-cli-latest#az-monitor-log-profiles-list&preserve-view=true)
4444

4545
If the issue persists after following the solution steps, please open a support case for further assistance.

support/azure/azure-monitor/toc.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ items:
1919
href: activity-logs/config-export/resolving-log-limit-issues-in-azure-function-apps.md
2020
- name: Understanding and Managing Diagnostic Settings Retention
2121
href: activity-logs/config-export/understanding-and-managing-diagnostic-settings-retention.md
22+
- name: Centralized Configuration of Activity Logs to Event Hub
23+
href: activity-logs/config-export/centralized-configuration-of-activity-logs-to-event-hub.md
24+
- name: Troubleshoot Azure CLI Configuration Issues
25+
href: activity-logs/config-export/troubleshoot-azure-cli-configuration-issues.md
2226
- name: Application Insights
2327
items:
2428
- name: OpenTelemetry troubleshooting

0 commit comments

Comments
 (0)