Setting up Diagnostics settings automatically for Resources

Copper Contributor

Hi All,

We have centralized log analytics workspace  within dedicated subscription. Rest of the resources are available in multiple spoke subscriptions. We need to automatically configure diagnostics settings  pointing centralize Log analytics workspace for all the resources of spoke subscriptions.

 

best Regards,

gayan

1 Reply

Hello @gaycnpch ,

 

You can use Azure Policy to configure Diagnostic Settings at scale.

Create diagnostic settings at scale using Azure Policy - Azure Monitor | Microsoft Docs

 

Use "Remediation task" to set it for the resources that have been created before you apply the policy.