Leverage Data Collection Rules to Send Performance Counters to Azure Storage Using Bicep

Gijs Reijn
4 min readMay 4, 2024

Azure Monitor Agent is the go-to agent for collecting data from IaaS workloads. The Azure Monitor Agent collects data through data collection rules (DCRs).

DCRs are deployed separately into resource groups and had only two ways of collecting data in specific destinations types.

Figure 1 — Data sources in DCRs

Lately, the Azure Monitor Agent has been expanded with two new upload capabilities, either to Event Hubs or Azure Storage.

In this tutorial, you will learn how to upload data to an Azure Storage Account and create DCR to upload performance counters to a specific container leveraging Bicep and AVM.

Create Storage Account with Container

The DCRs require a container to store information and events from IaaS workloads.

You can use the AVM module to create a Storage Account including a container with ease.

  1. Create a new file called main.bicep
  2. Paste this code into the file to add the Storage Account module
param storageAccountName string = 'stamacollector'
param dcrName string = 'dcrperfcounters'
param location string = resourceGroup().location

module storageAccount…

--

--

Gijs Reijn
Gijs Reijn

Written by Gijs Reijn

Sharing my experience through the IT world. Tutorials, guides, and opinions. Follow my newsletter at: http://eepurl.com/i1hSUw

No responses yet