A dashboard displaying a Green/Red indicator denoting the status of AVDs and VMs heartbeat
Step 1:
I am trying to write a query in Azure Monitor > Logs which gets the heartbeat status of all VMs, AVDs and SQL Managed Instances and then displays a green indicator if all of them are online or display a Red indicator even if one of them is offline. Thats the Overview dashboard. Attaching a usecase of this dahboard for reference.
Step 2:
Clicking on the respective green and red indicators need to take me to a different dashboard that lists all the VMs/AVDs/SQL Managed Instances with their heartbeat, status with green and red indicators.
I have the output of 2nd step but not sure how to create step 1 and link it with step 2.
My current querry and output of 2nd step is
let Threshold = 1h;
Heartbeat
| summarize arg_max(TimeGenerated, *) by Computer
| extend Status = iif(TimeGenerated >= ago(Threshold), "Connected", "Offline")
| extend Status = iif(Status == "Connected", strcat("π’","Connected"),strcat("π΄","Offline"))
| project Computer,Status, TimeGenerated
Computer | Status | TimeGenerated |
---|---|---|
VM 1 | π’ Online | 2023-02-15T09:10:57 |
VM 2 | π΄ Offline | 2023-02-15T09:10:57 |
I am new to Azure and KQL trying to understand how it works. Any guidance will be appreciated.
Thank you.