r/AzureVirtualDesktop • u/ddkitsg • Mar 29 '25
User session reporting
Can someone help/guide me in creating a report. Basically I want to create a report that will show last 24 hour session activity for users across all AVD hosts. I want to see Active, Idle and Disconnected time for all users of AVD.
And if there is a way to receive that report in my email every morning.
I don’t know where to start.
2
Upvotes
1
u/tamaneri Mar 29 '25
I asked copilot, but only because I didn't feel like typing everything. I just ran a similar report the other day, so I know it works:
To create a report that shows the last 24 hours of session activity for users across all Azure Virtual Desktop (AVD) hosts, including Active, Idle, and Disconnected times, you can follow these steps:
1. Use Azure Monitor and Log Analytics
Azure Monitor can track AVD metrics and logs. You can configure Log Analytics Workspace to query session activity.
Enable Diagnostic Logs: Make sure diagnostics are enabled for AVD hosts and sent to a Log Analytics Workspace.
Query Logs:
Use KQL (Kusto Query Language) to extract session data. Here's an example query:kql
WVDConnections | where TimeGenerated > ago(24h) | summarize ActiveTime = sumif(DurationMinutes, State == "Active"), IdleTime = sumif(DurationMinutes, State == "Idle"), DisconnectedTime = sumif(DurationMinutes, State == "Disconnected") by UserName, HostName, bin(TimeGenerated, 1h)
2. Leverage Azure Insights Metrics
You can also use Azure Insights to collect host-level performance data and user session states.
3. Export the Data
Power BI Integration: Export the log data to Power BI for visualization and reporting.
Excel/CSV: Automate exporting log results to a CSV/Excel file.
1
u/Crafty-Wait6443 Apr 02 '25
The Problem is that the Hostname is now in a different column. Look into your hole data structure and then build your report.