Avançar para o conteúdo principal

General availability: Custom retention for AzureActivity and Usage data tables

Data de publicação: 23 fevereiro, 2022

The capability to set specific retention on AzureActivity and Usage data tables in Log Analytics workspaces is now in general availability. Keep AzureActivity and Usage data for longer periods of time, while maintaining the workspace retention as low as needed. Previously, AzureActivity and Usage were treated differently–they had a minimum of 90 days retention and couldn’t be set with specific retention as other tables which forced you to increase the workspace retention. 

The minimum retention for AzureActivity and Usage remains 90 days to enable basic audit on operations and usability troubleshooting.

Setting retention by type for specific tables:



az monitor log-analytics workspace table update --resource-group $resourceGroup --workspace-name $workspaceName --name AzureActivity --retention-time 91



PATCH https://management.azure.com/subscriptions/subscription-id/resourcegroups/resource-group-name/providers/Microsoft.OperationalInsights/workspaces/workspace-name/tables/AzureActivity?api-2020-10-01

Authorization: Bearer eyJ0eXAiO…

Content-type: application/json



  "properties": {

    "retentionInDays": 91,



Note, PowerShell isn’t available yet.

Additional resources:

  • Features
  • Management