TimPHT
Sep 19, 2023Brass Contributor
Status:
Under review
Allow Custom Ressource Group and DCR in New AVD Insights Configuration Workbook
The new preview version of the AVD insights configuration workbook for the AMA agent only recognizes data collection rules that are created in a resource group called "AzureMonitor-DataCollectionRule...
wjd85
Feb 20, 2024Copper Contributor
Is this why I've been fighting with getting this workbook operational? We deploy our DCRs via CI/CD with our hostpool and session hosts and it lives in the same resource group as my hostpool. When I try to configure the workbook it says "The query returned no results" under "Available DCRs" and it wants me to create a new one. When I look at the session hosts they are all correctly configured and use the associated DCR that I'm deploying.
According to the resource query being ran by the portal its looking specifically for something named "microsoft-avdi-*"
resources
| where type =~"Microsoft.Insights/dataCollectionRules"
| where name startswith "microsoft-avdi-"
| project DCR=id, ["LA workspace"]=properties.destinations.logAnalytics[0].workspaceResourceId, resourceGroup, subscriptionId, default=iff(id=~"fakeId",1,0)
| join kind=inner (
resourcecontainers
| where type == "microsoft.resources/subscriptions"
| project subscriptionId, subscription=id, subname=name
) on subscriptionId
|project strcat('{"dcr":"',tolower(DCR), '", "workspace":"', ["LA workspace"],
'","resourceGroup":"',resourceGroup,'", "sub":"', subscription,'","subname":"',subname,'","default":"',default,'"}')
Why does it have to matter what I name the DCR, this black box magic name stuff makes it hard to enforce our own naming standards, and its totally obfuscated in the portal