|
| 1 | +--- |
| 2 | +title: Resolve Issues Configuring Long-Term Storage for Azure Activity Logs |
| 3 | +description: This article addresses the issue of configuring long-term storage for Azure Activity Logs, which by default are retained for 90 days. Users may need to store logs for a longer period for compliance or analysis purposes. |
| 4 | +ms.date: 07/23/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 | +# Resolve Issues Configuring Long-Term Storage for Azure Activity Logs |
| 11 | + |
| 12 | +This article addresses the issue of configuring long-term storage for Azure Activity Logs, which by default are retained for 90 days. Users may need to store logs for a longer period for compliance or analysis purposes. |
| 13 | + |
| 14 | +## Introduction |
| 15 | + |
| 16 | +Azure Activity Logs are retained for 90 days by default. This guide provides steps to configure long-term storage for these logs, ensuring they are available for extended analysis or compliance needs. |
| 17 | + |
| 18 | +### Step-by-Step Instructions to Configure Long-Term Storage |
| 19 | + |
| 20 | +1. **Create a Diagnostic Setting**: |
| 21 | + - Navigate to the Azure portal and select **Monitor**. |
| 22 | + - Under **Settings**, choose **Diagnostic settings**. |
| 23 | + - Click on **Add diagnostic setting**. |
| 24 | + - Select the **Activity Log** you wish to configure. |
| 25 | + |
| 26 | +2. **Specify the Destination**: |
| 27 | + - Choose the destination for your logs. Options include **Log Analytics**, **Event Hubs**, or **Azure Storage**. |
| 28 | + - Ensure the destination resource is configured to retain logs for more than 90 days. |
| 29 | + |
| 30 | +3. **Configure Retention Settings**: |
| 31 | + - If using Azure Storage, navigate to the **Storage Account**. |
| 32 | + - Under **Data Management**, select **Lifecycle Management**. |
| 33 | + - Set the retention period to your desired duration. |
| 34 | + |
| 35 | +4. **Verify Configuration**: |
| 36 | + - Return to the **Diagnostic settings** and ensure your settings are saved. |
| 37 | + - Check the destination resource to confirm logs are being stored as expected. |
| 38 | + |
| 39 | +### Common Issues and Solutions |
| 40 | + |
| 41 | +- **Logs Not Appearing in Destination**: Ensure the diagnostic setting is correctly configured and the destination resource is active. |
| 42 | +- **Retention Period Not Applied**: Verify that the retention settings in the destination resource are correctly set. |
| 43 | + |
| 44 | +## Reference |
| 45 | + |
| 46 | +- [Azure Monitor Documentation](/azure/azure-monitor/platform/activity-log?tabs=powershell) |
| 47 | +- [Azure Storage Lifecycle Management](/azure/storage/blobs/storage-lifecycle-management-concepts) |
| 48 | + |
| 49 | +If the issue persists after following the solution steps, please open a support case for further assistance. |
0 commit comments