r/AzureVirtualDesktop • • 18d ago

Just for fun - KQL

For many of us that don’t have the luxury of using Nerdio or Hydra and outside of the AVD built in insights.

What are your go to queries for overall platform health checks. I am currently building a dashboard and want some inspiration.

6 Upvotes

2 comments sorted by

4

u/Atlasavd 18d ago

Start with errors and things that will help you troubleshoot more efficiently.

WVDErrors | where TimeGenerated > ago(24h) | summarize Hits=count() by Code, CodeSymbolic | top 10 by Hits desc. From there, I'd build out WVDConnections for connection trends, WVDCheckpoints for connection stages, WVDHostRegistrations for registration activity, and Perf/Heartbeat for CPU, memory, disk, and host availability. CorrelationId is particularly useful for tying connection failures back to specific errors. Make sure your diagnostic settings and Azure Monitor Agent are feeding the appropriate Log Analytics workspace.

Full disclosure, I'm the founder of Atlas AVD, so I've spent quite a bit of time working with AVD monitoring. Even without a management platform, you can build some pretty useful dashboards with native KQL.

1

u/rdpsoft 16d ago

I'd second what Atlasavd has said below to get started.

Caveat: The challenge with pulling in just the Diagnostic schema from AVD via KQL queries is that you miss out a lot of nitty gritty granular data that helps you need to actually solve the problem, which is most often session host related as opposed to AVD Brokering/Gateway backplane related (and which you don't control anyway - Microsoft does). To get the session host level data, you need to start looking at and correlating Windows Event Logs and performance counters, even down at the process level. That volume of data, if funneled via Azure Monitor into Azure Log Analytics quickly drives up monitoring costs due to the way ALA prices log ingestion and log retention. Also, while you can get some client error/disconnect data from the Diagnostic schema via KQL queries, sometimes you need substantially more, such as routing and client side resource utilization/config as well, which is typically only provided in third party software that can load virtual channel extensions on the client side into the Windows App to gather it.

What we've elected to do with the AVD and RDS monitoring platform we sell is to leverage MS SQL instead, with automated rolling retention and purge settings to clean the DB regularly. For small tenants (e.g. less than 10 hosts), we deploy SQL Express which is totally free, and for larger tenants, they often already have SQL Standard doing something else in their environment, and even Azure SQL can often be less expensive than Azure Log Analytics ingestion.

Bottom line, there are a handful of vendors that provide monitoring at price points less than Nerdio or Hydra, such as us and Atlasavd's offering. It all comes down to your budget, your time, plus Azure Log Analytics costs versus going third party.