TimPHT's avatar
TimPHT
Copper Contributor
Sep 19, 2023
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-DataCollectionRules" and does not recognize any DCR that was created elsewhere.

 

We would like to have the option to use other resource groups and DCR.

Hope this can be adjusted during the preview.

4 Comments

  • TimDev's avatar
    TimDev
    Copper Contributor

    It seems the custom resource group has been implemented, but custom DCR and DCR naming is very valuable to follow organizational standards for resource naming.

  • TimPHT's avatar
    TimPHT
    Copper Contributor

    wjd85 Hi partially yes. It is now possible to add the DCR in any resource group BUT it must follow the naming microsoft-avdi-REGION. For example for a hostpool in westeurope the DCR must be named: microsoft-avdi-westeurope.

  • wjd85's avatar
    wjd85
    Copper 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