Skip to content

Commit fe6164e

Browse files
committed
Restoring original section with variable removed. Formatting changes.
1 parent cc811f8 commit fe6164e

File tree

1 file changed

+39
-17
lines changed

1 file changed

+39
-17
lines changed

articles/virtual-desktop/agent-updates-diagnostics.md

Lines changed: 39 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Set up diagnostics for monitoring agent updates
33
description: How to set up diagnostic reports to monitor agent updates.
44
author: Sefriend
55
ms.topic: how-to
6-
ms.date: 01/23/2023
6+
ms.date: 01/31/2023
77
ms.author: sefriend
88
manager: rkiran
99
---
@@ -26,6 +26,28 @@ To enable sending diagnostic logs to your Log Analytics workspace:
2626
> [!NOTE]
2727
> The log query results only cover the last 30 days of data in your deployment.
2828
29+
## Use diagnostics to see when an update becomes available
30+
31+
To see when agent component updates are available:
32+
33+
1. Access the logs in your Log Analytics workspace.
34+
35+
2. Select the **+** button to create a new query.
36+
37+
3. Copy and paste the following Kusto query to see if agent component updates are available for the specified session host. Make sure to change the **sessionHostName** parameter to the name of your session host.
38+
39+
> [!NOTE]
40+
> If you haven't enabled the Scheduled Agent Updates feature, you won't see anything in the NewPackagesAvailable field.
41+
42+
```kusto
43+
WVDAgentHealthStatus
44+
| where TimeGenerated >= ago(30d)
45+
| where SessionHostName == "sessionHostName"
46+
| project TimeGenerated, AgentVersion, SessionHostName, LastUpgradeTimeStamp, UpgradeState, UpgradeErrorMsg
47+
| sort by TimeGenerated desc
48+
| take 1
49+
```
50+
2951
## Use diagnostics to see when agent updates are happening
3052
3153
To see when agent updates are happening or to make sure that the Scheduled Agent Updates feature is working:
@@ -36,14 +58,14 @@ To see when agent updates are happening or to make sure that the Scheduled Agent
3658
3759
3. Copy and paste the following Kusto query to see when the agent has updated for the specified session host. Make sure to change the **sessionHostName** parameter to the name of your session host.
3860
39-
```kusto
40-
WVDAgentHealthStatus
41-
| where TimeGenerated >= ago(30d)
42-
| where SessionHostName == "sessionHostName"
43-
| project TimeGenerated, AgentVersion, SessionHostName, LastUpgradeTimeStamp, UpgradeState, UpgradeErrorMsg
44-
| summarize arg_min(TimeGenerated, *) by AgentVersion
45-
| sort by TimeGenerated asc
46-
```
61+
```kusto
62+
WVDAgentHealthStatus
63+
| where TimeGenerated >= ago(30d)
64+
| where SessionHostName == "sessionHostName"
65+
| project TimeGenerated, AgentVersion, SessionHostName, LastUpgradeTimeStamp, UpgradeState, UpgradeErrorMsg
66+
| summarize arg_min(TimeGenerated, *) by AgentVersion
67+
| sort by TimeGenerated asc
68+
```
4769
4870
## Use diagnostics to check for unsuccessful agent updates
4971
@@ -55,14 +77,14 @@ To check if an agent component update was unsuccessful:
5577
5678
3. Copy and paste the following Kusto query to see when the agent has updated for the specified session host. Make sure to change the **sessionHostName** parameter to the name of your session host.
5779
58-
```kusto
59-
WVDAgentHealthStatus
60-
| where TimeGenerated >= ago(30d)
61-
| where SessionHostName == "sessionHostName"
62-
| where MaintenanceWindowMissed == true
63-
| project TimeGenerated, AgentVersion, SessionHostName, LastUpgradeTimeStamp, UpgradeState, UpgradeErrorMsg, MaintenanceWindowMissed
64-
| sort by TimeGenerated asc
65-
```
80+
```kusto
81+
WVDAgentHealthStatus
82+
| where TimeGenerated >= ago(30d)
83+
| where SessionHostName == "sessionHostName"
84+
| where MaintenanceWindowMissed == true
85+
| project TimeGenerated, AgentVersion, SessionHostName, LastUpgradeTimeStamp, UpgradeState, UpgradeErrorMsg, MaintenanceWindowMissed
86+
| sort by TimeGenerated asc
87+
```
6688
6789
## Next steps
6890

0 commit comments

Comments
 (0)