Forum Discussion
garymansell
Jun 07, 2021Brass Contributor
Is there a KQL Query to detect Session hosts that are in drain mode (not accepting new sessions)?
Hi, I have setup an Azure function to lookout for problem WVD session hosts (VMs running for more that 15 mins but not available in the host pool), which then shuts them down and sets Drain mode ...
garymansell
Jun 07, 2021Brass Contributor
Thanks, but that does not really help me...
It seems (I may be wrong?) that Azure Logic Apps can't run Powershell to get the Drain mode state of session hosts in a Host Pool. So, it seems that Logic Apps are more easily created to run a KQL query and then email the results based on some logic.
Unfortunately, I don't think I can get the Drain Mode / Allow New Sessions value via a KQL query, so wondered if:
1) I am missing the value, and it is actually there, or can be obtained via a KQL Query
2) If not, is there some other way that I can get the info and use it in a Logic App.
It seems (I may be wrong?) that Azure Logic Apps can't run Powershell to get the Drain mode state of session hosts in a Host Pool. So, it seems that Logic Apps are more easily created to run a KQL query and then email the results based on some logic.
Unfortunately, I don't think I can get the Drain Mode / Allow New Sessions value via a KQL query, so wondered if:
1) I am missing the value, and it is actually there, or can be obtained via a KQL Query
2) If not, is there some other way that I can get the info and use it in a Logic App.
David Taig
Jun 07, 2021Iron Contributor
I don't believe there is a way to check if a Host is in Drain mode
For Allow New Sessions we are running PowerShell with Automation to get those details and more..
#AVD Host Status
- Abhishek_nblMar 07, 2022Copper Contributor
David Taig can you help me with how you have setup this report in your screenshot.
is the script available somewhere ?