A dashboard displaying a Green/Red indicator denoting the status of AVDs and VMs heartbeat

Vipeen Sekharan 30 Reputation points
2023-02-15T04:20:29.2766667+00:00

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.

User's image

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.

Azure Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
3,310 questions
Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,976 questions
Azure Virtual Desktop
Azure Virtual Desktop
A Microsoft desktop and app virtualization service that runs on Azure. Previously known as Windows Virtual Desktop.
1,566 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.