Azure_ActivityLogs_2

Ensure that Activity Log Retention is set 365 days or greater

Description

Ensure activity log retention is set for 365 days or greater.

Remediation

Perform the following in the Azure Console:

  1. Go to Activity log
  2. Click on Export
  3. Set Retention (days) is set to 365 or 0
  4. Select Save

Perform the following in Azure Command Line Interface 2.0:

  1. Use the below command to set the Activity log Retention (days) to 365 or greater.
    az monitor log-profiles update –name <logProfileName> –setretentionPolicy.days=<number of days> retentionPolicy.enabled=true
  2. Use the below command to store logs for forever (indefinitely).
    az monitor log-profiles update –name <logProfileName> –set retentionPolicy.days=0 retentionPolicy.enabled=false

References:

  1. https://docs.microsoft.com/en-us/azure/monitoring-and-diagnostics/monitoring-archive-activity-log

Service

Logging and Monitoring

Severity

Medium

Compliance

Mapping

We are now live on AWS Marketplace.
The integrated view of your cloud infrastructure is now easier than ever!