WVDCheckpoints table, how do I find out what server the user was on when entry made?

%3CLINGO-SUB%20id%3D%22lingo-sub-2442611%22%20slang%3D%22en-US%22%3EWVDCheckpoints%20table%2C%20how%20do%20I%20find%20out%20what%20server%20the%20user%20was%20on%20when%20entry%20made%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2442611%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'm%20trying%20to%20debug%20an%20mystery%20slowness%20issue%20that%20is%20happening%20on%20random%20servers.%26nbsp%3B%20The%20resources%20are%20all%20ok%20but%20the%20user%20experience%20is%20really%20slow%20for%20all%20users%20on%20the%20server.%26nbsp%3B%20After%20restarting%20it%20it's%20fine.%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESo%20far%20the%20only%20clue%20I've%20found%20in%20the%20logs%20is%20in%20the%20WVDCheckpoints%20table.%26nbsp%3B%20On%20servers%20that%20are%20slow%20logins%20take%2090k%2B%20ms%20compared%20to%20the%20normal%20%26gt%3B10k%20ms.%26nbsp%3B%20%26nbsp%3BI'd%20like%20to%20write%20a%20query%20that%20uses%20this%20data%20but%20joins%20it%20or%20groups%20it%20by%20the%20the%20server%20so%20I%20can%20look%20back%20and%20find%20out%20when%20it%20started%20going%20slow.%26nbsp%3B%20Then%20maybe%20I%20can%20look%20at%20other%20logs%20for%20clues%20in%20that%20time%20range.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhat%20is%20the%20right%20way%20to%20join%20or%20group%20this%20table%20by%20session%20host%3F%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fazure-monitor%2Freference%2Ftables%2FWVDCheckpoints%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EAzure%20Monitor%20Logs%20reference%20-%20WVDCheckpoints%20%7C%20Microsoft%20Docs%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'd%20also%20like%20to%20set%20up%20an%20alert%20when%20logins%20are%20taking%20more%20than%2030k%2B%20ms.%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20in%20advance%20for%20any%20tips%20or%20pointing%20me%20to%20any%20documentation%20that%20could%20help.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22WVDCheckpoints.PNG%22%20style%3D%22width%3A%20363px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F288250i0FBAD2A2D5A32142%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22WVDCheckpoints.PNG%22%20alt%3D%22WVDCheckpoints.PNG%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2442669%22%20slang%3D%22en-US%22%3ERe%3A%20WVDCheckpoints%20table%2C%20how%20do%20I%20find%20out%20what%20server%20the%20user%20was%20on%20when%20entry%20made%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2442669%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1039167%22%20target%3D%22_blank%22%3E%40joellopez%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20think%20I%20may%20have%20found%20my%20solution%20on%20this%20page%3A%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fblog.itprocloud.de%2FWindows-Virtual-Desktop-Monitoring-the-Spring-backend%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fblog.itprocloud.de%2FWindows-Virtual-Desktop-Monitoring-the-Spring-backend%2F%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20just%20had%20to%20modify%20it%20a%20bit%20to%20add%20the%20filter%20by%20the%20host%20name%20and%20add%20the%20client%20IP.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-applescript%22%3E%3CCODE%3EWVDConnections%0A%7C%20where%20Type%20%3D~%22WVDConnections%22%20and%20State%20%3D~%20%22Started%22%0A%7C%20extend%20Multi%3Dsplit(_ResourceId%2C%20%22%2F%22)%20%7C%20project%20ResourceAlias%2C%20ClientSideIPAddress%2C%20HostPool%3Dtoupper(HP%3DMulti%5B8%5D)%2C%20SessionHostName%20%2C%20UserName%20%2CCState%3Diff(SessionHostOSVersion%3D%3D%22%26lt%3B%26gt%3B%22%2C%22Failure%22%2C%22Success%22)%2C%20CorrelationId%2C%20TimeGenerated%2C%20ResourceGroup%3DMulti%5B4%5D%2C%20DesktopGroup_s%3Dtoupper(strcat(RG%3DMulti%5B4%5D%2C%22.%22%2C%20HP%3DMulti%5B8%5D))%0A%7C%20join%20kind%3D%20leftouter%20(%0AWVDCheckpoints%0A)%20on%20CorrelationId%0A%7C%20extend%20DurationFromLogon%3Ddatetime_diff(%22Second%22%2CTimeGenerated1%2CTimeGenerated)%0A%7C%20where%20Name%3D~%22RdpStackLogon%22%0A%7C%20where%20SessionHostName%20contains%20%22hp1-1%22%0A%7C%20project%20UserName%2C%20ClientSideIPAddress%2C%20SessionHost%3DSessionHostName%2C%20TimeStamp%3DTimeGenerated1%2C%20DurationFromLogon%0A%7C%20order%20by%20SessionHost%2C%20TimeStamp%20desc%0A%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20will%20give%20me%20the%20login%20times%20and%20duration%20of%20the%20users%20on%20a%20server%20so%20I%20can%20find%20out%20when%20started%20getting%20slow.%26nbsp%3B%20Here%20you%20can%20see%20how%20it%20improved%20after%20we%20rebooted%20it.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22query.PNG%22%20style%3D%22width%3A%20416px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F288252i889CA53385167AA0%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22query.PNG%22%20alt%3D%22query.PNG%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENow%20that%20I%20know%20what%20day%20it%20started%20I%20have%20to%20figure%20out%20where%20to%20look%20next%20to%20find%20out%20what%20is%20causing%20it.%26nbsp%3B%20If%20you%20have%20any%20ideas%20please%20share.%26nbsp%3B%20I'm%20pretty%20new%20at%20this.%26nbsp%3B%26nbsp%3B%3CBR%20%2F%3E%3CBR%20%2F%3EIn%20the%20mean%20time%20if%20you%20have%20any%20tips%20on%20how%20to%20set%20up%20an%20alert%20when%20logins%20take%20more%20than%2020%20seconds%20I'd%20also%20appreciate%20it.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

Hi,

 

I'm trying to debug an mystery slowness issue that is happening on random servers.  The resources are all ok but the user experience is really slow for all users on the server.  After restarting it it's fine.  

 

So far the only clue I've found in the logs is in the WVDCheckpoints table.  On servers that are slow logins take 90k+ ms compared to the normal >10k ms.   I'd like to write a query that uses this data but joins it or groups it by the the server so I can look back and find out when it started going slow.  Then maybe I can look at other logs for clues in that time range.

 

What is the right way to join or group this table by session host?

Azure Monitor Logs reference - WVDCheckpoints | Microsoft Docs

 

I'd also like to set up an alert when logins are taking more than 30k+ ms.  

 

Thanks in advance for any tips or pointing me to any documentation that could help.

 

WVDCheckpoints.PNG

2 Replies

@joellopez 

 

I think I may have found my solution on this page:
https://blog.itprocloud.de/Windows-Virtual-Desktop-Monitoring-the-Spring-backend/

 

I just had to modify it a bit to add the filter by the host name and add the client IP.

 

WVDConnections
| where Type =~"WVDConnections" and State =~ "Started"
| extend Multi=split(_ResourceId, "/") | project ResourceAlias, ClientSideIPAddress, HostPool=toupper(HP=Multi[8]), SessionHostName , UserName ,CState=iff(SessionHostOSVersion=="<>","Failure","Success"), CorrelationId, TimeGenerated, ResourceGroup=Multi[4], DesktopGroup_s=toupper(strcat(RG=Multi[4],".", HP=Multi[8]))
| join kind= leftouter (
WVDCheckpoints
) on CorrelationId
| extend DurationFromLogon=datetime_diff("Second",TimeGenerated1,TimeGenerated)
| where Name=~"RdpStackLogon"
| where SessionHostName contains "hp1-1"
| project UserName, ClientSideIPAddress, SessionHost=SessionHostName, TimeStamp=TimeGenerated1, DurationFromLogon
| order by SessionHost, TimeStamp desc

 

This will give me the login times and duration of the users on a server so I can find out when started getting slow.  Here you can see how it improved after we rebooted it.

 

query.PNG

 

Now that I know what day it started I have to figure out where to look next to find out what is causing it.  If you have any ideas please share.  I'm pretty new at this.  

In the mean time if you have any tips on how to set up an alert when logins take more than 20 seconds I'd also appreciate it.

 

For the alerts, based on the query you have, you should see a:
+ New Alert Rule - hopefully, that allows you to configure the alert.
https://docs.microsoft.com/en-us/azure/azure-monitor/alerts/alerts-log

Server performance, can be caused by a multitude of things, but would look at:
Antivirus (exclusions, scheduled scan times, setup etc).
Is MS Teams running in WVD Optimized?
Has the OS been optimized? - https://github.com/The-Virtual-Desktop-Team/Virtual-Desktop-Optimization-Tool
Are there disconnected sessions taking up resources? http://woshub.com/remote-desktop-session-time-limit/

Good luck!