Skip to main content


5.3 Enable Azure Monitor Resource Logging for All Services that Support it (Manual)

Profile Applicability

• Level 1


Resource Logs capture activity to the data access plane while the Activity log is a subscription-level log for the control plane. Resource-level diagnostic logs provide insight into operations performed within that resource itself; for example, reading or updating a secret from a Key Vault. Currently, 95 Azure resources support Azure Monitoring (See the more information section for a complete list), including Network Security Groups, Load Balancers, Key Vault, AD, Logic Apps, and CosmosDB. The content of these logs varies by resource type.

A number of back-end services were not configured to log and store Resource Logs for certain activities or for a sufficient length. It is crucial that monitoring is correctly configured to log all relevant activities and retain those logs for a sufficient length of time. Given that the mean time to detection in an enterprise is 240 days, best practices recommend a minimum retention period of two years.


A lack of monitoring reduces the visibility into the data plane, and therefore an organization's ability to detect reconnaissance, authorization attempts or other malicious activity. Unlike Activity Logs, Resource Logs are not enabled by default. Specifically, without monitoring it would be impossible to tell which entities had accessed a data store that was breached. In addition, alerts for failed attempts to access APIs for Web Services or Databases are only possible when logging is enabled.


Costs for monitoring varies with Log Volume. Not every resource needs to have logging enabled. It is important to determine the security classification of the data being processed by the given resource and adjust the logging based on which events need to be tracked. This is typically determined by governance and compliance requirements.


From Azure Portal

The specific steps for configuring resources within the Azure console vary depending on resource, but typically the steps are:

  1. Go to the resource
  2. Click on Diagnostic settings
  3. In the blade that appears, click "Add diagnostic setting"
  4. Configure the diagnostic settings
  5. Click on Save


Azure Subscriptions should log every access and operation for all resources. You should send logs to Storage and a Log Analytics Workspace or equivalent third-party system. Keep logs in readily accessible storage for a minimum of one year, and then move to inexpensive cold storage for a duration of time as necessary.

If retention policies exist, but it is not possible to store logs in a Storage Account (for example, if you only select the Event Hubs or Log Analytics options), the retention policies have no effect. Enable all monitoring at first, and then be more aggressive moving data to cold storage if the volume of data becomes a cost concern.

From Azure Portal

The specific steps for configuring resources within the Azure console vary depending on resource, but typically the steps are:

  1. Go to the resource.
  2. Click Diagnostic settings.
  3. In the blade that appears, click "Add diagnostic setting".
  4. Configure the diagnostic settings.
  5. Click Save.

Supported Log Categories
Logs and Audit - Fundamentals
Collecting Logs
Key Vault Logging
Monitor Diagnostic Settings
Overview of Diagnostic Logs
Supported Services for Diagnostic Logs
Diagnostic Logs for CDNs

Additional Information

Note: The Center for Internet Security (CIS) Benchmark covers some specific Diagnostic Logs separately.

Section 3 - Storage Accounts: Enable Storage Logging for Queue Service for 'Read', 'Write', and 'Delete' requests (lacework-global-616).

Section 6 - Network: Ensure that Network Security Group Flow Log retention period is 'greater than 90 days' (lacework-global-633).

For an up-to-date list of Azure resources which support Azure Monitor, refer to the "Supported Log Categories" reference.