Configuring your Azure Monitor Agent DCR

This article explains how to quickly automate the addition of numerous virtual machines at scale into existing DCR as resources, using Azure Policy.

There are four initiatives that exist, based on your bespoke requirements.

I decided to test the Deploy Windows Azure Monitor Agent with user-assigned managed identity-based auth and associate with Data Collection Rule initiative;

Step 1 – I started by creating a UAMI (User Assignd Managed Identity) because I like to be able to identify and manage my Managed Identities, then,

Step 2 – Go to Azure Policy > Policy Definitions > and search for your initiate,

Complete the Basics and Advanced tabs accordingly,
Parameters tab:
Effect = DeployIfNotExists

Scope Policy to supported operating systems = your choice,

Additional virtual machines = your choice,

Data Collection Rule Resource id = (you will notice that UDR’s have no properties, so you cannot merely get the resource ids. The format is the following:
/subscriptions/{yoursubID}/resourceGroups/{yourRGID}/providers/Microsoft.Insights/dataCollectionRules/{yourDCRID}

Bring your own UAMI = (I pre-created my own so that I can manage the UAMI) = true

UAMI name = if you bring your own UAMI, add that Managed identity name

UAMI resource group,

UAMI resource group location,

2 comments

  1. I’ve been browsing online more than 3 hours today, yet I never found any interesting article like yours. It is pretty worth enough for me. In my opinion, if all website owners and bloggers made good content as you did, the net will be a lot more useful than ever before.

Leave a comment

Your email address will not be published. Required fields are marked *