Storage Analytics Data Retention Policy in Microsoft Azure

As per MSDN: Azure Storage Analytics performs logging and provides metrics data for a storage account. You can use this data to trace requests, analyze usage trends, and diagnose issues with your storage account.

Storage Analytics doesn’t delete any logging data and keeps writing till reaches 20 TB limit.

So it’s important to understand the limit as once it reaches the limit, storage analytics will not write anything until some free space is avail.

We can handle the situation in two ways with below option.
1. Manually Delete requests

2. Set retention Policy (My preference )

Configure data retention policy for both logging and metrics data.

Storage Analytics metrics are available for the Blob, Queue, Table, and File services.

Storage Analytics logging is available for the Blob, Queue, and Table services.

For our project, it was Blob storage and follow steps to do the changes.

You can set the retention policy with C# or PowerShell script code.

I will be sharing the PowerShell script to set the property.

1. Get the storage analytics configuration file.
StorageAnalytics.exe -a <account> -k <key> -t blob -get > D:\sam\blob.xml

2. Edit the xml file based on below highlighted section.

3. Now upload the updated xml file to apply the changes.
StorageAnalytics.exe -a <account> -k <key> -t blob -set D:\sam\blob.xml

Storage Analytics Data Retention Policy
Storage Analytics Data Retention Policy

Read some SharePoint tutorials below:

Hope this will be helpful.

Donwload Hub site pdf

Download SharePoint Online Tutorial PDF FREE!

Get update on Webinars, video tutorials, training courses etc.