Skip to content

Commit f0205f4

Browse files
Merge pull request #285981 from EdB-MSFT/freshness-migrate-to-azure-storage-lifecycle
refresh and SFI
2 parents c118498 + 37ca048 commit f0205f4

File tree

1 file changed

+15
-17
lines changed

1 file changed

+15
-17
lines changed

articles/azure-monitor/essentials/migrate-to-azure-storage-lifecycle-policy.md

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ms.author: edbaynash
66
ms.service: azure-monitor
77
ms.topic: how-to
88
ms.reviewer: lualderm
9-
ms.date: 08/16/2023
9+
ms.date: 09/02/2024
1010

1111
#Customer intent: As a dev-ops administrator I want to migrate my retention setting from diagnostic setting retention storage to Azure Storage lifecycle management so that it continues to work after the feature has been deprecated.
1212
---
@@ -23,43 +23,41 @@ For logs sent to a Log Analytics workspace, retention is set for each table on t
2323
> - March 31, 2023 – The Diagnostic Settings Storage Retention feature will no longer be available to configure new retention rules for log data. This includes using the portal, CLI PowerShell, and ARM and Bicep templates. If you have configured retention settings, you'll still be able to see and change them in the portal.
2424
> - September 30, 2025 – All retention functionality for the Diagnostic Settings Storage Retention feature will be disabled across all environments.
2525
26-
27-
2826
## Prerequisites
2927

3028
An existing diagnostic setting logging to a storage account.
3129

32-
## Migration Procedures
33-
30+
## Migration procedures
3431

3532
## [Azure portal](#tab/portal)
33+
3634
To migrate your diagnostics settings retention rules, follow the steps below:
3735

3836
1. Go to the Diagnostic Settings page for your logging resource and locate the diagnostic setting you wish to migrate
3937
1. Set the retention for your logged categories to *0*
4038
1. Select **Save**
41-
:::image type="content" source="./media/retention-migration/diagnostics-setting.png" alt-text="A screenshot showing a diagnostics setting page.":::
39+
:::image type="content" source="./media/retention-migration/diagnostics-setting.png" lightbox="./media/retention-migration/diagnostics-setting.png" alt-text="A screenshot showing a diagnostics setting page.":::
4240

4341
1. Navigate to the storage account you're logging to
4442
1. Under **Data management**, select **Lifecycle Management** to view or change lifecycle management policies
4543
1. Select List View, and select **Add a rule**
46-
:::image type="content" source="./media/retention-migration/lifecycle-management.png" alt-text="A screenshot showing the lifecycle management screen for a storage account.":::
44+
:::image type="content" source="./media/retention-migration/lifecycle-management.png" lightbox="./media/retention-migration/lifecycle-management.png" alt-text="A screenshot showing the lifecycle management screen for a storage account.":::
4745
1. Enter a **Rule name**
4846
1. Under **Rule Scope**, select **Limit blobs with filters**
4947
1. Under **Blob Type**, select **Append Blobs** and **Base blobs** under **Blob subtype**.
5048
1. Select **Next**
51-
:::image type="content" source="./media/retention-migration/lifecycle-management-add-rule-details.png" alt-text="A screenshot showing the details tab for adding a lifecycle rule.":::
49+
:::image type="content" source="./media/retention-migration/lifecycle-management-add-rule-details.png" lightbox="./media/retention-migration/lifecycle-management-add-rule-details.png" alt-text="A screenshot showing the details tab for adding a lifecycle rule.":::
5250

5351
1. Set your retention time, then select **Next**
54-
:::image type="content" source="./media/retention-migration/lifecycle-management-add-rule-base-blobs.png" alt-text="A screenshot showing the Base blobs tab for adding a lifecycle rule.":::
52+
:::image type="content" source="./media/retention-migration/lifecycle-management-add-rule-base-blobs.png" lightbox="./media/retention-migration/lifecycle-management-add-rule-base-blobs.png" alt-text="A screenshot showing the Base blobs tab for adding a lifecycle rule.":::
5553

5654
1. On the **Filters** tab, under **Blob prefix** set path or prefix to the container or logs you want the retention rule to apply to. The path or prefix can be at any level within the container and will apply to all blobs under that path or prefix.
57-
For example, for *all* insight activity logs, use the container *insights-activity-logs* to set the retention for all of the log in that container logs.
55+
For example, for *all* insight activity logs, use the container *insights-activity-logs* to set the retention for all of the logs in that container.
5856
To set the rule for a specific webapp app, use *insights-activity-logs/ResourceId=/SUBSCRIPTIONS/\<your subscription Id\>/RESOURCEGROUPS/\<your resource group\>/PROVIDERS/MICROSOFT.WEB/SITES/\<your webapp name\>*.
5957

6058
Use the Storage browser to help you find the path or prefix.
61-
The example below shows the prefix for a specific web app: **insights-activity-logs/ResourceId=/SUBSCRIPTIONS/d05145d-4a5d-4a5d-4a5d-5267eae1bbc7/RESOURCEGROUPS/rg-001/PROVIDERS/MICROSOFT.WEB/SITES/appfromdocker1*.
62-
To set the rule for all resources in the resource group, use *insights-activity-logs/ResourceId=/SUBSCRIPTIONS/d05145d-4a5d-4a5d-4a5d-5267eae1bbc7/RESOURCEGROUPS/rg-001*.
59+
The example below shows the prefix for a specific web app: **insights-activity-logs/ResourceId=/SUBSCRIPTIONS/aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e/RESOURCEGROUPS/rg-001/PROVIDERS/MICROSOFT.WEB/SITES/appfromdocker1*.
60+
To set the rule for all resources in the resource group, use *insights-activity-logs/ResourceId=/SUBSCRIPTIONS/aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e7/RESOURCEGROUPS/rg-001*.
6361
:::image type="content" source="./media/retention-migration/blob-prefix.png" alt-text="A screenshot showing the Storage browser and resource path." lightbox="./media/retention-migration/blob-prefix.png":::
6462

6563
1. Select **Add** to save the rule.
@@ -68,7 +66,7 @@ To set the rule for a specific webapp app, use *insights-activity-logs/ResourceI
6866

6967
## [CLI](#tab/cli)
7068

71-
Use the [az storage account management-policy create](/cli/azure/storage/account/management-policy#az-storage-account-management-policy-create) command to create a lifecycle management policy. You must still set the retention in your diagnostic settings to *0*. See the Azure portal section above for more information.
69+
Use the [az storage account management-policy create](/cli/azure/storage/account/management-policy#az-storage-account-management-policy-create) command to create a lifecycle management policy. You must still set the retention in your diagnostic settings to *0*. For more information, see the migration procedures for the Azure Portal.
7270

7371

7472

@@ -99,7 +97,7 @@ The sample policy definition file below sets the retention for all blobs in the
9997
"appendBlob"
10098
],
10199
"prefixMatch": [
102-
"insights-activity-logs/ResourceId=/SUBSCRIPTIONS/ABCD1234-5849-ABCD-1234-9876543210AB"
100+
"insights-activity-logs/ResourceId=/SUBSCRIPTIONS/aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e"
103101
]
104102
}
105103
}
@@ -114,15 +112,15 @@ The sample policy definition file below sets the retention for all blobs in the
114112

115113
## [Templates](#tab/templates)
116114

117-
Apply the following template to create a lifecycle management policy. You must still set the retention in your diagnostic settings to *0*. See the Azure portal section above for more information.
115+
Apply the following template to create a lifecycle management policy. You must still set the retention in your diagnostic settings to *0*. For more information, see the migration procedures for the Azure Portal.
118116

119117
```azurecli
120118
121119
az deployment group create --resource-group <resource group name> --template-file <template file>
122120
123121
```
124122

125-
The following template sets the retention for storage account *azmonstorageaccount001* for all blobs in the container *insights-activity-logs* for all resources for the subscription ID *ABCD1234-5849-ABCD-1234-9876543210AB*.
123+
The following template sets the retention for storage account *azmonstorageaccount001* for all blobs in the container *insights-activity-logs* for all resources for the subscription ID *aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e*.
126124

127125
```json
128126
{
@@ -153,7 +151,7 @@ The following template sets the retention for storage account *azmonstorageaccou
153151
"appendBlob"
154152
],
155153
"prefixMatch": [
156-
"insights-activity-logs/ResourceId=/SUBSCRIPTIONS/ABCD1234-5849-ABCD-1234-9876543210AB"
154+
"insights-activity-logs/ResourceId=/SUBSCRIPTIONS/aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e"
157155
]
158156
}
159157
}

0 commit comments

Comments
 (0)