Query Details
# Last Heartbeat Arc Machines
## Query Information
#### Description
This query lists the latest heartbeat for each Azure Arc onboarded machine.
## Sentinel
```KQL
let ArcMachines = arg("").Resources
| where type == "microsoft.hybridcompute/machines"
| distinct id;
Heartbeat
| summarize arg_max(TimeGenerated, TimeGenerated, Computer, Resource, ResourceId) by Computer
| where ResourceId in (ArcMachines)
```This query is designed to identify the most recent heartbeat signal for each machine that has been onboarded to Azure Arc. Here's a simple breakdown of what it does:
Identify Azure Arc Machines:
Find Latest Heartbeat:
arg_max function, which selects the entry with the maximum (latest) TimeGenerated for each computer.Filter for Arc Machines:
In summary, this query provides a list of the most recent heartbeat signals for machines that are managed through Azure Arc, helping to monitor their operational status.

Bert-Jan Pals
Released: January 20, 2025
Tables
Keywords
Operators