services/DesktopVirtualization/hostPools/alerts.yaml [616:656]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      | parse _ResourceId with "/subscriptions/" subscription "/resourcegroups/" ResourceGroup
      "/providers/microsoft.compute/virtualmachines/" ComputerName

      | extend ComputerName=tolower(ComputerName)

      | project ComputerName, RenderedDescription, subscription, ResourceGroup, TimeGenerated

      | join kind = leftouter

      (WVDAgentHealthStatus

      | where _ResourceId contains "xHostPoolNamex"

      | parse _ResourceId with "/subscriptions/" subscriptionAgentHealth "/resourcegroups/"
      ResourceGroupAgentHealth "/providers/microsoft.desktopvirtualization/hostpools/"
      HostPool

      | parse SessionHostResourceId with "/subscriptions/" VMsubscription "/resourceGroups/"
      VMresourceGroup "/providers/Microsoft.Compute/virtualMachines/" ComputerName

      | extend ComputerName=tolower(ComputerName)

      | summarize arg_max(TimeGenerated,*) by ComputerName

      | project VMresourceGroup, ComputerName, HostPool

      ) on ComputerName'
    autoMitigate: true
    autoResolve: true
    autoResolveTime: 0:30:00
  references: null
  deployments:
  - name: AVD-HostPool
    template: Deploy-AVD-HostPool-Alert.json
    type: Policy
    tags:
    - alz
    properties:
      scope: Subscription
      multiResource: false
    enabled: true
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



services/DesktopVirtualization/hostPools/alerts.yaml [872:912]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      | parse _ResourceId with "/subscriptions/" subscription "/resourcegroups/" ResourceGroup
      "/providers/microsoft.compute/virtualmachines/" ComputerName

      | extend ComputerName=tolower(ComputerName)

      | project ComputerName, RenderedDescription, subscription, ResourceGroup, TimeGenerated

      | join kind = leftouter

      (WVDAgentHealthStatus

      | where _ResourceId contains "xHostPoolNamex"

      | parse _ResourceId with "/subscriptions/" subscriptionAgentHealth "/resourcegroups/"
      ResourceGroupAgentHealth "/providers/microsoft.desktopvirtualization/hostpools/"
      HostPool

      | parse SessionHostResourceId with "/subscriptions/" VMsubscription "/resourceGroups/"
      VMresourceGroup "/providers/Microsoft.Compute/virtualMachines/" ComputerName

      | extend ComputerName=tolower(ComputerName)

      | summarize arg_max(TimeGenerated,*) by ComputerName

      | project VMresourceGroup, ComputerName, HostPool

      ) on ComputerName'
    autoMitigate: true
    autoResolve: true
    autoResolveTime: 0:30:00
  references: null
  deployments:
  - name: AVD-HostPool
    template: Deploy-AVD-HostPool-Alert.json
    type: Policy
    tags:
    - alz
    properties:
      scope: Subscription
      multiResource: false
    enabled: true
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



