Data collection rule should have destinations configured
High
Azure
General
datacollectionrules-data-collection-rule-destinati
Applies to
Microsoft.Insights/dataCollectionRules
What CGPulse checks
A resource passes this rule when destinationsCount must be one of [1]. Anything else is reported as a finding with the evaluated property value attached as evidence.
How to fix it
Configure destinations to define where collected monitoring data is sent. In Azure Portal: Monitor > Data Collection Rules > select rule > add destination. See: https://learn.microsoft.com/en-us/azure/azure-monitor/essentials/data-collection-rule-overview
CLI
az monitor data-collection rule show --ids "{id}" --query "destinations" -o jsonBicep
resource dcr 'Microsoft.Insights/dataCollectionRules@2023-03-11' = {{
name: '{name}'
location: resourceGroup().location
properties: {{
destinations: {{
logAnalytics: [
{{
workspaceResourceId: '<workspace-id>'
name: 'logAnalytics'
}}
]
}}
dataFlows: [
{{
streams: ['Microsoft-Perf']
destinations: ['logAnalytics']
}}
]
}}
}}Terraform
resource "azurerm_monitor_data_collection_rule" "{name}" {
name = "{name}"
resource_group_name = "{rg}"
location = var.location
destinations {
log_analytics {
workspace_resource_id = "<workspace-id>"
name = "log-analytics"
}
}
data_flow {
streams = ["Microsoft-Perf"]
destinations = ["log-analytics"]
}
}
Compliance frameworks
Is your environment compliant with this rule?
CGPulse checks it — and 621 others — against your Azure and AWS accounts with read-only access.
Related Azure rules
- Action Group should be enabled
- Activity Log Alert should be enabled
- AKS cluster logs should be sent to Log Analytics
- AKS cluster must enable RBAC
- AKS cluster must enable RBAC
- AKS cluster should be a private cluster
- AKS cluster should disable local accounts
- AKS cluster should enable Azure RBAC for Kubernetes