Open JCoreMS opened 1 year ago
Next release will have combined query to alert on VMs based on Host Pool.
Perf
| where TimeGenerated > ago(15m)
| where ObjectName == "LogicalDisk" and CounterName == "% Free Space"
| where InstanceName !contains "D:"
| where InstanceName !contains "_Total"| where CounterValue <= 5.00
| parse _ResourceId with "/subscriptions/" subscription "/resourcegroups/" ResourceGroup "/providers/microsoft.compute/virtualmachines/" ComputerName
| project ComputerName, CounterValue, subscription, ResourceGroup, TimeGenerated
| join kind = leftouter
(
WVDAgentHealthStatus
| where TimeGenerated > ago(15m)
| parse _ResourceId with "/subscriptions/" subscriptionAgentHealth "/resourcegroups/" ResourceGroupAgentHealth "/providers/microsoft.desktopvirtualization/hostpools/" HostPool
| parse SessionHostResourceId with "/subscriptions/" VMsubscription "/resourceGroups/" VMresourceGroup "/providers/Microsoft.Compute/virtualMachines/" ComputerName
| project VMresourceGroup, ComputerName, HostPool
) on ComputerName
Possibly consider for each Host Pool / RG as well so it can be filtered out for only specific host pools that aren't known to have full HDDs or test.