Sessionright

Azure Virtual Desktop Insights: Setup, Key Queries and Ingestion Costs

By Jay H.Published Updated 10 min read

Jay H. · Founder, Sessionright
Founder of Sessionright. Twenty years running Citrix, NetScaler, Citrix Cloud, NetScaler Console, Azure and Azure Virtual Desktop estates; writes the guides and reviews the platform's rules.

Setting up Insights and not sure what to alert on? Walk through it with a Sessionright engineer: 15 minutes, free.

Microsoft estimates that Azure Virtual Desktop Insights ingests 92 to 145 MB of Log Analytics data per session host per day, or roughly 3 to 5 GB per VM every 31 days (Insights costs). Analytics Logs ingestion lists at $2.30 per GB in East US after the first 5 GB (Azure Retail Prices API). On those figures, a 50-host pool ingests 150 to 250 GB a month, about $334 to $564 at list price, before you've run a single query.

This guide covers what the workbook shows, how to enable it with diagnostic settings and a data collection rule (DCR), how to control ingestion, which KQL queries to save, which alerts to set, and where Insights stops.

What Insights shows

Insights is an Azure Monitor workbook built on three datasets: AVD service diagnostics (the WVD* tables), session host performance counters, and Windows Event Logs (enable Insights). Insights at Scale is generally available and shows several host pools in one view with no extra setup (what's new).

Tab What you get Worth knowing
Overview Daily active users, connections, connected hours, alerts Only severity 0 alerts appear
Connection Reliability Disconnections against concurrent connections, top 20 disconnection events Pivots by transport, gateway region, client version, host
Connection Performance Round-trip time by gateway region, time to connect Under 100 ms RTT is ideal; over 200 ms is low quality
Host Performance Input delay by host, CPU, memory, disk timing Per-host input delay should be under 100 ms
Host Diagnostics Hosts over counter thresholds, events, Host browser Extra counters you add show up here
Utilization Session history, active and idle host counts The data behind a scaling plan
Clients Users on outdated Windows App and Remote Desktop clients Some mobile clients show a build number, not a version

Sources: use cases and glossary. The glossary grades input delay as good below 150 ms, acceptable from 150 to 500 ms, poor from 500 to 2,000 ms and bad from 2 seconds up. It splits time to connect into user route, stack connected, logon (profiles, Group Policy, shell start, FSLogix) and shell start to shell ready.

Enabling it: diagnostic settings and data collection rules

Before you start

  1. Make sure your host pools are on the Azure Resource Manager release of AVD.
  2. Create a Log Analytics workspace just for AVD session hosts. Microsoft suggests starting on pay-as-you-go (enable Insights).
  3. Assign the two reader roles. Read access lets people view data but not manage host pools.

Step 1: Resource diagnostic settings

Open aka.ms/avdi and select Workbooks > Check Configuration. Pick the Subscription, Resource Group and Host Pool. Open the Resource diagnostic settings tab and choose the Log Analytics workspace (enable Insights).

  1. Host pool. If you see "No existing diagnostic configuration was found for the selected host pool", select Configure host pool > Deploy. This turns on Management Activities, Feed, Connections, Errors, Checkpoints, HostRegistration and AgentHealthStatus.
  2. Workspace. This means the AVD workspace, not the Log Analytics workspace. On the matching error, select Configure workspace > Deploy to turn on Management Activities, Feed, Errors and Checkpoints.
  3. Refresh the workbook.

To set this up by hand, open the object and go to Diagnostic settings > Add diagnostic setting > Send to Log Analytics. Data can take a few hours to appear after the first setup (diagnostics). For autoscale logging, see the AVD scaling plan guide.

Step 2: Session host data settings (the DCR)

  1. Go to Host pools > pool > Insights > Open Configuration Workbook > Session host data settings.
  2. Choose a Workspace destination and a DCR resource group, then select Create data collection rule. This workspace can be different from the diagnostics workspace.
  3. If you see "Some hosts in the host pool are not sending data to the selected Log Analytics workspace", select the DCR. Then select Deploy association, Add extension and Add system managed identity, and refresh.
  4. Select Configure performance counters > Apply Config and Configure Events > Deploy. Repeat until Missing counters and Missing Event Logs are both empty.

Automated deployment only handles pools of 1,000 session hosts or fewer. For larger pools, install the Azure Monitor Agent from the ARM template you build hosts with (enable Insights). Insights support for the Azure Monitor Agent became generally available in September 2023. Microsoft set 31 August 2024 as the deprecation date for the Log Analytics agent (what's new).

The DCR collects 20 counters every 30 or 60 seconds, plus six event logs: Application, System, two TerminalServices logs and two FSLogix-Apps logs (cost estimation).

Controlling ingestion cost

Microsoft's cost estimation page models two VMs. The light VM has 4 vCPUs, 16 sessions a day and 100 processes per session. The power VM has 6 vCPUs, 6 sessions and 200 processes.

Source Per VM per day Microsoft's advice
Performance counters 90 to 130 MB Biggest lever: lower the frequency or remove extra counters
Windows Event Logs 2 to 15 MB Keep them; unhealthy hosts send more
AVD diagnostics under 1 MB Keep them; under 1% of storage cost

Each counter scales with a different factor: per VM, per core, per disk, per session or per process. User Input Delay per Process(*)\Max Input Delay samples every process in every session every 30 seconds. That's why session density drives the bill.

Measure before you cut. Microsoft's query shows billed MB per counter for the last day. Replace the host names with your own:

let WVDHosts = dynamic(['host1.contoso.com', 'host2.contoso.com']);
Perf
| where TimeGenerated > ago(1d)
| where Computer in (WVDHosts)
| extend PerfCounter = strcat(ObjectName, ":", CounterName)
| summarize Records = count(TimeGenerated), InstanceNames = dcount(InstanceName), Bytes=sum(_BilledSize) by PerfCounter
| extend Billed_MBytes = Bytes / (1024 * 1024), BytesPerRecord = Bytes / Records
| sort by Records desc

The query lists every counter in the workspace, not just the Insights defaults. Counters outside the default 20 are candidates for removal. Removing a default counter breaks the chart that uses it.

  • Retention. Analytics Logs include 31 days of retention (cost-logs). Retention beyond that lists at $0.10 per GB per month in East US (Retail Prices API). Monthly active users covers 28 days, so with 30 days of data or less it reads low (glossary).
  • No Basic Logs. WVDConnections and WVDAgentHealthStatus don't support the Basic table plan (WVDConnections; WVDAgentHealthStatus).
  • Commitment tiers start at 100 GB per day and save up to 30% (cost-logs). That's 3,100 GB a month, or about 620 to 1,030 hosts on Microsoft's per-VM estimate.
  • Keep Microsoft Sentinel off this workspace. When Sentinel is enabled on a workspace, all data in it also incurs Sentinel charges.
  • Use the daily cap only as a backstop. It's under Usage and estimated costs > Daily Cap. Once the cap is hit, collection stops until the workspace's reset hour, which you can't change. Microsoft recommends ingestion-time transformations for routine reduction (daily cap).

For compute costs, see the AVD cost optimization checklist.

Key queries: WVDAgentHealthStatus and connections

WVDAgentHealthStatus reports from each host roughly every 30 seconds (sample queries). Each record includes Status, AgentVersion, SxSStackVersion, AllowNewSessions and SessionHostHealthCheckResult (table reference). This query returns each host's latest status where it isn't Available:

WVDAgentHealthStatus
| where TimeGenerated > ago(30m)
| summarize arg_max(TimeGenerated, Status, AgentVersion, SxSStackVersion, ActiveSessions, AllowNewSessions) by SessionHostName, _ResourceId
| where Status != "Available"

Run WVDAgentHealthStatus | summarize count() by Status once to see the exact status values your hosts report. Available is the healthy status. Unavailable means the host is off or failed a fatal check, such as domain join or the side-by-side stack listener (statuses and health checks). To see which check failed, use Microsoft's HealthChecks of SessionHost sample, which decodes results such as DomainJoin, DomainTrust, FSLogix, SxSStack and URLCheck. Fixes are in AVD session host unavailable.

Connection records go through three states: Started, Connected and Completed (diagnostics). This query finds connections that completed without ever connecting and joins them to their errors:

WVDConnections
| where TimeGenerated > ago(1d)
| summarize States = make_set(State), UserName = take_any(UserName), SessionHostName = take_any(SessionHostName) by CorrelationId
| where set_has_element(States, "Completed") and not(set_has_element(States, "Connected"))
| join kind=leftouter (WVDErrors | project CorrelationId, CodeSymbolic, Source, ServiceError, Message) on CorrelationId
| project CorrelationId, UserName, SessionHostName, CodeSymbolic, Source, ServiceError, Message

For error trends, ServiceError is false for problems you can fix yourself. It's true for problems to escalate to Microsoft, quoting the CorrelationId (diagnostics):

WVDErrors
| where TimeGenerated > ago(1d)
| summarize Errors = count(), Users = dcount(UserName) by CodeSymbolic, Source, ServiceError
| order by Errors desc

Alerts worth setting

Insights doesn't create alerts. It only shows Azure Monitor alerts you set up separately (enable Insights). To create one, go to Monitor > Alerts > + Create > Alert rule and choose Custom log search. The evaluation frequency can be anywhere from one minute to 24 hours (log search alert rules).

Alert Signal Setting
Host not Available The health query above Rows > 0, split by SessionHostName, every 5 to 15 minutes
Fixable errors rising WVDErrors where ServiceError == false Count above your baseline
Microsoft-side errors WVDErrors where ServiceError == true Any row; open a case
AVD service problems Service Health Service issue and Health advisory Microsoft's recommended alerts
Daily cap reached _LogOperation | where Category =~ "Ingestion" | where Detail contains "OverQuota" Rows > 0, every 5 minutes (daily cap)

A few constraints from the alert docs:

  • Alert queries can't use bag_unpack(), so Microsoft's health-check sample won't work as an alert.
  • One-minute rules can fail on queries that use union or take.
  • Each dimension combination is charged separately.

Ingestion lags about 15 minutes (troubleshoot Insights), so one-minute rules gain little. If you want the host-down alert on the Overview tab, make it severity 0.

Where Insights stops (and what an AI operator adds)

Microsoft's known issues list the limits:

  • It lags. Log data takes about 15 minutes to arrive.
  • It miscounts at the edges. Total sessions can overcount, available sessions ignore scaling policies, and time to connect includes the time users spend typing credentials.
  • It can't see failures before AVD. Connections that never reach the service produce no diagnostics (diagnostics).
  • Customising it freezes it. A saved copy of the workbook stops receiving Microsoft's updates.
  • It only displays. It shows a host as Unavailable or input delay at 600 ms. Someone still has to link that to agent versions, FSLogix events and the scaling plan, then fix it.

That last gap is where an AI operator helps. It can run these queries on a schedule, show health, error and cost signals side by side, and propose a fix that you approve before anything changes.

FAQ

What is Azure Virtual Desktop Insights?

It's an Azure Monitor workbook that shows AVD diagnostics, session host performance counters and Windows Event Logs from a Log Analytics workspace in one view. Open it at aka.ms/avdi or from a host pool's Insights blade.

How do I enable Azure Virtual Desktop Insights?

Open Workbooks > Check Configuration and deploy the host pool and workspace diagnostic settings. Create the DCR, then deploy the association, the Azure Monitor Agent and the managed identity. Finally, apply the counters and event logs until nothing is listed as missing.

How much does Azure Virtual Desktop Insights cost?

Insights is billed through Log Analytics ingestion and retention. Microsoft's example works out to 3 to 5 GB per VM every 31 days. The Azure Monitor pricing page has regional rates and notes that the first 5 GB per billing account each month is free.

Why is Azure Virtual Desktop Insights not showing data?

Check the configuration workbook for missing counters or events, and confirm you have read access to the AVD resource groups and the workspace. Also check firewall rules for the agent. Recent data can take 15 minutes to appear.

Does AVD Insights still use the Log Analytics agent?

No. Insights now uses the Azure Monitor Agent with a data collection rule. Microsoft deprecated the Log Analytics agent on 31 August 2024.

Want a second pair of eyes?

Sessionright's AVD assessment reviews your diagnostic settings, DCR coverage, retention and agent health across host pools, then reports gaps and ingestion outliers. It's read-only by default. If you later let Sessionright for Azure Virtual Desktop act on the findings, you approve each change and every action is logged (security). If you would rather talk it through, book a 15-minute call: no install, no sales deck.

Sources

Want this watched for you, with the fix drafted before you ask?

Sessionright is an AI operator for Azure Virtual Desktop: it checks session hosts, scaling plans, FSLogix and cost continuously, attaches the evidence, and proposes fixes for a named approver to sign. It has run against simulated estates and Sessionright's own Azure lab tenant so far. To see what it finds on your own estate, run the free assessment: one command in Azure Cloud Shell reads your estate, never changes it, and writes an HTML report in about five minutes for a typical estate. Your estate data stays with you unless you choose to email yourself the HTML report through Sessionright. Design partner program: 90-day free Operator pilot, then 50% off year 1; list price at signing held to month 24. Engineer-led assessments are 50% off for design partners. Outside the program the onboarding assessment is $2,500, up to 500 users, one tenant.

Not ready for that? Talk to a Sessionright engineer: 15 minutes, free, and you leave with a next step.

Get this script as a file

Download the read-only script pack, with the source guides and instructions for each file.

Or get the next guide by email. One email per new guide, no marketing list.

New Sessionright guides by email. No marketing drip; unsubscribe in one click.

Related guides

Citrix and NetScaler are trademarks of Citrix Systems, Inc. and/or its affiliates. Azure is a trademark of the Microsoft group of companies. Sessionright is not affiliated with or endorsed by Cloud Software Group, Citrix or Microsoft.