Query Details

Onboarded Machines By Resource Group

Query

# Onboarded Machines by Resource Group

## Query Information

#### Description
This query lists the amount of onboarded Azure Arc Machines for each resourceGroup.

## Sentinel
```KQL
arg("").Resources
| where type == "microsoft.hybridcompute/machines"
| summarize Total = dcount(id), SampleDevices = make_set(name, 10) by resourceGroup
```

Explanation

This query is designed to provide a summary of Azure Arc Machines that have been onboarded, organized by their resource group. Here's a breakdown of what the query does in simple terms:

  1. Data Source: It starts by accessing the Resources table, which contains information about various resources in Azure.

  2. Filter: It filters the data to only include resources of the type "microsoft.hybridcompute/machines". This means it is specifically looking at Azure Arc Machines.

  3. Summarize: The query then summarizes the data by:

    • Counting the distinct number of machine IDs (dcount(id)) for each resource group, which gives the total number of onboarded machines in each group.
    • Creating a sample set of up to 10 machine names (make_set(name, 10)) for each resource group, providing a small example of the machines present in each group.
  4. Output: The result is a list showing each resource group, the total number of onboarded machines in that group, and a sample of machine names from each group.

Details

Bert-Jan Pals profile picture

Bert-Jan Pals

Released: January 19, 2025

Tables

Resources

Keywords

ResourcesMachinesResourceGroup

Operators

argResourceswhere==summarizedcountidmake_setnameby

Actions