Skip to content
AVD Health Checks using Azure Portal | Monitoring | KQL Queries

AVD Health Checks using Azure Portal | Monitoring | KQL Queries

Written By Anoop C Nair
Last Updated January 20, 2022
Posted In AVD
SHARE

Let’s check AVD Health Checks using Azure Portal, Azure Monitor, Log Analytics, and KQL Queries. I hope the information provided in this post will help you with Azure Virtual Desktop troubleshooting scenarios.

The AVD health checks and monitoring options can also be automated. The automation part of monitoring is not covered in this post. However, this post will get the details about AVD daily monitoring checks.

You can also get the AVD utilization details from Azure Monitor, and Log Analytics KQL queries. THIS POST ALSO SHARES A sample KQL query to get the top 10 connection errors of AVD. You can also get Top 10 Feed error details from the Log Analytics workspace.

In the Azure portal, you can see four (4) basic AVD monitoring checks available for AVD session hosts (VM Status). You will need to go to individual session hosts to check the status. Log analytics is where you will get the details about ten (10) AVD monitoring checks.

Patch My PC

It’s really interesting to see monitoring checks related to WebRTC Redirector (Teams media optimization-related component), FSLogix, and MSIX App attach. Y log analytics workspace provides CPU and Memory utilization reports for AVD estate, as explained in the below section of this post.

Azure Portal AVD Session Host Health Checks

You have a basic AVD session Host health check option (VM Status) in the Azure Virtual Desktop portal. FOUR (4) monitoring checks are exposed with this health check option. You can have more detailed health check options in the log analytics workspace.

You can quickly look at the four health checks performed from Azure PortalAzure Virtual DesktopHost Pools (Select any of the host pools from the list) – Session Hosts – Click on Session Host’s hyperlink.

As you can see in the screenshot below, VM status is where you can get the details of the AVD Health Checks.

Azure Portal AVD Session Host Health Check Option - AVD Health Checks
Azure Portal AVD Session Host Health Check Option – AVD Health Checks

Domain Joined Check – SessionHost healthy: is joined to the domain
SxS Stack Listener Check – SessionHost healthy: SessionHost healthy: SxS stack listener is ready
Meta Data Service Check – The Azure Instance Metadata Service (IMDS) is presumed available
App Attach Health Check – SessionHost healthy: MSIX packages have been properly staged.”

AVD Health checks statusStatusTroubleshooting
DomainJoinedCheck  Success
SxSStackListenerCheck  Success
MetaDataServiceCheck  Success
AppAttachHealthCheck  Success
VM Status Option – AVD Health Checks option

The following is one of the common error messages you get if the Session host VM is not reachable. You will need to check the VMs available if you get this message as a first step.

Session host information is not available because the VM cannot be reached. This can be a result of the VM being deallocated or hibernated. It is also possible that a networking error is blocking connectivity.

VM Status - Azure Portal AVD Session Host Health Check Option - AVD Health Check
VM Status – Azure Portal AVD Session Host Health Check Option – AVD Health Checks

AVD Health Checks using Azure Monitoring Log Analytics

AVD uses Azure Monitor for monitoring and alerts like many other Azure services. This lets admins identify issues through a single interface. You have a better option to perform AVD health checks. You will need to enable Azure Monitor and send monitoring data to the log analytics workspace for this AVD health checks option.

TEN (10) health checks are performed if we use this method. This is a more comprehensive list. You can launch this health check from the Log Analytics workspace. The out of box KQL query HealthChecks of Session Host helps to check the status of session hosts.

AVD Health checks status
DomainJoin
Domain Trust
FSLogix
SxS Stack
URL Check
Geneva Agent
Domain Reachable
WebRTC Redirector
SxSStack Encryption
IMDS Reachable
MSIX Package Staging
AVD Health Checks Options using Azure Portal | Monitoring | KQL Queries

You will need to log into the Azure portal, navigate to the Log Analytics Workspace where the managed devices are part, and click on the Logs tab. You can click on the Query tab from the popup window. You can click on the query called HealthChecks of Session Host.

AVD KQL Query -  AVD Health Checks using Azure Monitoring - Log Analytics
AVD KQL Query – AVD Health Checks using Azure Monitoring – Log Analytics

Let’s have a quick look at the KQL query to check the status of AVD Session Hosts.

// AVD Health Checks of SessionHost 
// Renders a summary of SessionHost health status. 
let MapToDesc = (idx:long) {
    case(idx == 0,  "DomainJoin",
         idx == 1,  "DomainTrust",
         idx == 2,  "FSLogix",
         idx == 3,  "SxSStack",
         idx == 4,  "URLCheck",
         idx == 5,  "GenevaAgent",
         idx == 6,  "DomainReachable",
         idx == 7,  "WebRTCRedirector",
         idx == 8,  "SxSStackEncryption",
         idx == 9,  "IMDSReachable",
         idx == 10, "MSIXPackageStaging",
         "InvalidIndex")
};
WVDAgentHealthStatus
| extend var = tostring(SessionHostHealthCheckResult)
| extend result = parse_json(var)
| mv-expand result
| extend HealthCheckName = tolong(result.HealthCheckName)
| extend HealthCheckResult = tolong(result.HealthCheckResult)
| extend HealthCheckDesc = MapToDesc(HealthCheckName)
| summarize count(), min(TimeGenerated), max(TimeGenerated) by HealthCheckResult, HealthCheckName, HealthCheckDesc, SessionHostName

As you can see, the below graph shows the health of components that are enabled for your AVD deployment. I don’t see FSLogix, WebRTCRedirector, etc., in the below picture.

 AVD KQL Query Results - AVD Health Checks using Azure Portal | Monitoring | KQL Queries
AVD KQL Query Results – AVD Health Checks Options using Azure Portal | Monitoring | KQL Queries

AVD Top 10 Connection Errors Report

As mentioned above, AVD uses Azure Monitor for monitoring and alerts like many other Azure services. You will need to enable Azure Monitor to get the following data.

You can use the following documentation to learn more about the Azure Monitor setup for AVD. Use Monitor Azure Virtual Desktop Monitor – Azure | Microsoft Docs.

You will need to log into the Azure portal, navigate to the Log Analytics Workspace where the managed devices are part, and click on the Logs tab.

You can click on the Query tab from the popup window. You can get some sample KQL queries to get more details about AVD utilization reports, connection errors, feed errors, etc.

 AVD Top 10 Connection Errors Report - AVD Health Check Reports
AVD Top 10 Connection Errors Report

The following KQL query gives you the details of the top 10 AVD connection errors for the last 2 hours (2h is the value used in the following query.)

// 
// Bar Chart of top 10 none service-related connection errors by user count in the last 24 hours. 
// Query top 10 connection errors by number of users experiencing a specific error. 
// Alternatively replace "UserName" in the query by "CorrelationID" to see how often the error has occurred. 
// The "CorrelationId" is unique for each connection attempt. 
// The flag on "ServiceError" helps to focus on issues that are more likely mitigated by administrative tasks. 
// Change the ActivityType based on the issues you are troubleshooting. 
WVDErrors 
| where TimeGenerated > ago(2h) 
| where ServiceError == "false" 
| where ActivityType == "Connection"  
| summarize UserCount = dcount(UserName) by CodeSymbolic 
| sort by UserCount desc 
| top 10 by UserCount 
| render barchart  

The following are the Top 10 AVD Connection Errors that you can see from the log analytics workspace using KQL queries.

 AVD Top 10 Connection Errors Report
AVD Top 10 Connection Errors Report

AVD Insights DashboardAVD Utilization Reports

You can get the Azure Virtual Desktop (AVD) insights dashboard to get an overview of the entire AVD deployments. You can get the details using the individual Resource Group and Host Pool filters. This will get you the AVD Insights DashboardAVD Utilization Reports.

You can navigate Azure Virtual DesktopInsights and filter on the Resource Group and Host Pool.

  • Open the Portal.Azure.com.
  • Navigate to Azure Virtual Desktop workflow and Click on Insights.
  • Filter the insights with the correct Resource Group and Host Pool that you want to check the insights.
  • Check the AVD utilization reports.
 AVD Insights Dashboard - AVD Utilization Reports - AVD health checks
AVD Insights Dashboard – AVD Utilization Reports – AVD health checks

You can get the following details from AVD insights. The following are the different tabs: Overview, Connection Diagnostics, Connection Performance, Host Diagnostics, Host Performance, Users, Utilization, Clients, and Alerts.

One example is Host CPU and Memory metrics for the AVD utilization dashboard!

  AVD Insights Dashboard - AVD Utilization Reports
AVD Insights Dashboard – AVD Utilization Reports – AVD health checks

Log Analytics Tables for AVD

You can check the Log Analytics tables for AVD. I have provided the supported list of tables for AVD. You can use the following tables for troubleshooting AVD related issues. There is two (2) section available under Azure Monitor implementation.

  • Azure Monitor for VMs
  • LogManagement

The following are important tables that are used for Azure Virtual Desktop monitoring checks. You can check more details about AVD reference tables from Microsoft Docs https://docs.microsoft.com/en-us/azure/azure-monitor/reference/tables/tables-category#windows-virtual-desktop.

Log Analytics Tables for AVD
1Heartbeat
2InsightsMetrics
3Usage
4WVDAgentHealthStatus
5WVDCheckpoints
6WVDConnections
7WVDErrors
8WVDFeeds
9WVDHostRegistrations
10WVDManagement
Log Analytics Tables for AVD

You can check the list of Tables available in the LogManagement section of the log analytics workspace.

 Log Analytics Tables for AVD -  AVD health checks
Log Analytics Tables for AVD – AVD health checks

You can enter the table’s name in the query window in Log Analytics, as shown in the below screenshot. The table entries will give you the output of the latest entries of the tables related to AVD.

Azure Virtual Desktop – AVD Errors TableWVDErrors

The WVDErrors table is useful from Azure Monitor and Log Analytics workspace. You can use the following table, “WVDErrors,” as an example to get the latest errors encountered in AVD deployment.

  • Click on Log Analytics Workspace where you stored all the log data from AVD.
  • Navigate to Logs blade.
  • Open the Log Analytics KQL Query window.
  • Type in WVDErrors and click on Run button to see the results.
 Azure Virtual Desktop - AVD Errors Table - WVDErrors
Azure Virtual Desktop – AVD Errors Table – WVDErrors – AVD health checks

Author

Written by

Anoop C Nair is Workplace Technology solution architect with 25+ years of experience in global enterprise organizations such as JP Morgan, Capgemini, etc. Microsoft Certified Trainer. Microsoft MVP from 2015 onwards for consecutive 11+ years! He also conducts Intune and modern workplace tech training for enterprise organizations. He is Blogger, Speaker, and Founder of HTMD Community and HTMD Conference. His main focus is on Device Management technologies like Intune, Windows, Cloud PC. He writes about technologies like Intune, SCCM, Windows, Cloud PC, Windows, Entra, Microsoft Security.

Discussion

Join the discussion

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

Related guides

AVD

Windows 365 Frontline is Now Windows 365 Flex with No Change to Features or Licensing

Key Takeaways Windows 365 Frontline is Now Windows 365 Flex with No Change to Features or Licensing! Hey, let’s discuss about Windows 365 and Azure Virtual Desktop Expanding Access to Cloud Windows for Every Workstyle. The way people work is evolving, and so are cloud-delivered Windows solutions. From small businesses to enterprises and shift workers, […]

AC Anoop C Nair 4 min read
AVD

How RDP Multipath Improves Azure Virtual Desktop Connectivity Using Dynamic UDP Path Selection

Key Takeaways How RDP Multipath Improves Azure Virtual Desktop Connectivity Using Dynamic UDP Path Selection! RDP Multipath creates multiple connection paths between your device and the remote desktop instead of relying on just one. It continuously checks which path is performing best and automatically switches if one becomes slow or drops. This ensures a smoother […]

AC Anoop C Nair 4 min read
AVD

Resilient Connectivity Architecture with Multiple Service Instances in Azure

Key Takeaways Resilient Connectivity Architecture with Multiple Service Instances in Azure! This architecture helps IT administrators by providing a more reliable and scalable connectivity platform for cloud services. Because multiple service instances run independently within each region, the platform can continue operating even if one component fails. This reduces service disruptions and ensures that users […]

AC Anoop C Nair 3 min read