Forum Discussion
Azure Monitoring Agent Virtual Machines not connecting to log analytics workspace
According to Microsoft’s official guidance, when deploying Data Collection Rules (DCRs) through Terraform or Azure Policy, it is essential to explicitly configure and apply the azurerm_monitor_data_collection_rule_association resource to the target virtual machine. Without this association, the Azure Monitor Agent will not transmit heartbeat signals or performance metrics to the Log Analytics workspace. Microsoft documentation further emphasizes that DCRs require a direct association with the intended resources, and in certain cases, automated deployments may fail to trigger the necessary agent refresh, necessitating a manual re‑application of the association.
https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/monitor_data_collection_rule_association
https://learn.microsoft.com/en-us/azure/azure-monitor/data-collection/data-collection-rule-overview