Skip to main content
Five Steps for Cloud Compliance Readiness·A practical playbook for security teamsDownload
CIS Microsoft Azure Foundations v6.0.0 · 6.1.4

Azure services that support resource logs should have logging turned on

  • Level 1
  • Management and Governance Services

This check looks at the Azure resources that can emit resource logs and whether a diagnostic setting is sending those logs somewhere. The safe setting is a diagnostic setting on each supporting resource that collects its log categories to a Log Analytics workspace, storage account or event hub.

Why it matters

Microsoft states that resource logs are not collected by default; you have to create a diagnostic setting to collect them. Until then, a Key Vault, firewall, database or storage account can be used or misused without leaving a record you can search later. When something goes wrong, the question is usually who touched a resource and when, and resource logs are where much of that answer lives (Azure Monitor diagnostic settings).

Platform metrics and the activity log are gathered automatically, but they do not replace resource logs, so a subscription can look monitored while its services are silent.

How to check it yourself

In the Azure portal open a resource, then Monitoring > Diagnostic settings. Or go to Monitor > Settings > Diagnostic settings and pick the resource. An empty list means no resource logs are being collected for it.

A read-only listing for one resource with Azure CLI:

az monitor diagnostic-settings list \
  --resource /subscriptions//resourceGroups//providers/Microsoft.KeyVault/vaults/

To sweep a subscription, loop over az resource list --query "[].id" -o tsv and run the command above for each id; resources that return no settings need attention. Run it against a test subscription first.

How to fix it

Create one diagnostic setting per resource. In the portal choose Add diagnostic setting, name it, tick a category group (allLogs, or audit for only the audit-type logs) or individual categories, and pick a destination. Microsoft lists Log Analytics workspace, storage account, event hub and partner solutions as destinations.

az monitor diagnostic-settings create --name central-logs \
  --resource  \
  --workspace  \
  --logs '[{"categoryGroup":"allLogs","enabled":true}]'

Not every service offers category groups; where it does not, list the individual categories. Azure Policy can apply the same setting to many resources at once, which is easier than repeating the command. ConfigCobra only reports the gap and suggests the fix; it never changes your Azure.

What changes when you fix it

Nothing changes for users of the service. The effect lands on whoever owns monitoring and the budget: Microsoft notes that diagnostic settings can generate cost depending on the destination and the volume collected, so collect only the categories you need. The destination must already exist, and a regional storage account or event hub must be in the same region as the resource.

Data starts arriving within about 90 minutes according to Microsoft. Teams that run alerts or queries in Log Analytics gain new tables to work with, and anyone with access to the workspace can then read these logs, so set workspace permissions deliberately. A resource can hold up to five diagnostic settings, so check for existing ones before adding another.

Included in

BenchmarkCIS IDProfile
CIS Microsoft Azure Foundations v6.0.06.1.4Level 1

Check this on your Microsoft Azure

ConfigCobra runs this check with every other control of the CIS Microsoft Azure Benchmarks, read-only.

Get in touch

Let's talk.

Whether you're evaluating ConfigCobra, running an audit, or managing a client fleet — we respond within one business day.

Free trial