|
| 1 | +--- |
| 2 | +title: Understanding and Managing Diagnostic Settings Retention |
| 3 | +description: Provides guidance for understanding and managing diagnostic settings retention. |
| 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 | +# Understanding and managing diagnostic settings retention |
| 11 | + |
| 12 | +When you manage Azure resources, you might experience issues that are related to the transition from diagnostic settings storage retention to Azure Storage lifecycle management. This article provides guidance to handle these issues effectively. |
| 13 | + |
| 14 | +## Common issues and solutions |
| 15 | + |
| 16 | +- **Issue**: Users might notice that templates aren't displayed when they try to verify resources that are affected by the transition from legacy solutions to diagnostic settings. |
| 17 | +- **Root cause**: The automatic switch from activity log solutions to diagnostic settings might cause confusion if users don't fully understand diagnostic settings retention. |
| 18 | + |
| 19 | +### Instructions to resolve diagnostic settings issues |
| 20 | + |
| 21 | +1. Determine how resources are affected: |
| 22 | + 1. Navigate to the Azure portal > **All Services**. |
| 23 | + 1. Select **Resource Manager**. |
| 24 | + 1. Select **Deploy**, and then select **Templates** in the left pane. |
| 25 | + 1. Check whether any resources are affected by the transition. |
| 26 | + |
| 27 | +2. To determine whether legacy solutions are in use, run the following PowerShell command: |
| 28 | + |
| 29 | + ```powershell |
| 30 | + $WorkspaceName = Get-AzOperationalInsightsWorkspace |
| 31 | + foreach ($Name in $WorkspaceName) { |
| 32 | + Get-AzOperationalInsightsDataSource -Kind AzureActivityLog -ResourceGroupName $Name.ResourceGroupName -WorkspaceName $Name.Name |
| 33 | + } |
| 34 | + ``` |
| 35 | +
|
| 36 | + If no output is returned, legacy solutions aren't in use, and no further action is required. |
| 37 | +
|
| 38 | +3. Understand that the transition to diagnostic settings is automatic. If your environment is already using diagnostic settings, no additional steps are necessary. |
| 39 | +
|
| 40 | +## References |
| 41 | +
|
| 42 | +- [Azure Monitor activity logs](/azure/azure-monitor/platform/activity-log?tabs=powershell#legacy-collection-methods) |
| 43 | +- [Azure Storage lifecycle management](/azure/storage/blobs/storage-lifecycle-management-concepts) |
| 44 | +
|
| 45 | +If the issue persists after you follow these steps, open a support case for further assistance. |
0 commit comments