Activity Log setting can't be enabled

Prem Nair 1 Reputation point
2022-03-31T19:37:47.807+00:00

Hi, I tried to create the activity log and tried to set my retention days to 50 but I wasn't able to enable it and got the following error. Earlier, when I used to do it in a different account, it would get enabled and then would reset automatically. 188905-capture.jpg188893-capture1.jpg

Azure Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
2,938 questions
Azure Storage Accounts
Azure Storage Accounts
Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
2,836 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. SwathiDhanwada-MSFT 18,211 Reputation points
    2022-04-01T04:33:44.533+00:00

    @Prem Nair Welcome to Microsoft Q & A Community Forum. I understand that you are trying to store activity logs into storage account using legacy experience. Kindly register resource provider "Microsoft.Insights" using below PowerShell commands.

    Register-AzResourceProvider -ProviderNamespace Microsoft.Insights  
    

    Before using a resource provider, your Azure subscription must be registered for the resource provider. Registration configures your subscription to work with the resource provider. Once registered, try to export the activity logs again.

    Activity log events are retained in Azure for 90 days and then deleted. There is no charge for entries during this time regardless of volume. From the information you have provided, you want to set the retention period to 50 days which is even less than the default retention period. I would suggest you export the activity logs using new experience by following below steps.

    • Go to subscription -> Click on Activity Log -> Click on Export Activity Logs
      189043-image.png
    • Clicking on Export Activity Logs opens Diagnostics Log window as shown below.
      188985-image.png
    • Click on "Add Diagnostic Log" as shown in above highlighted section of the image.
    • Select all the logs you need and send it to appropriate destination where you want to store your logs and click on save.

    189044-image.png

    0 comments No comments