Skip to content

Commit d9a8aec

Browse files
authored
Merge pull request #277793 from davidsmatlak/ds-move-arg-health
Moves Service Health and Resource Health include files for ARG sample
2 parents c7bfbd0 + 277a225 commit d9a8aec

File tree

3 files changed

+21
-25
lines changed

3 files changed

+21
-25
lines changed

includes/resource-graph/samples/bycat/azure-service-health.md renamed to articles/service-health/includes/azure-service-health.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
---
2-
author: davidsmatlak
3-
ms.service: resource-graph
2+
ms.service: service-health
43
ms.topic: include
54
ms.date: 04/09/2024
6-
ms.author: davidsmatlak
7-
ms.custom: generated
5+
author: rboucher
6+
ms.author: robb
87
---
98

109
### Active Service Health event subscription impact

includes/resource-graph/samples/bycat/resource-health.md renamed to articles/service-health/includes/resource-health.md

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
---
2-
author: davidsmatlak
3-
ms.service: resource-graph
2+
ms.service: service-health
43
ms.topic: include
54
ms.date: 07/07/2022
6-
ms.author: davidsmatlak
7-
ms.custom: generated
5+
author: rboucher
6+
ms.author: robb
87
---
98

10-
### Count of virtual machines by availability state and Subscription Id
9+
### Count of virtual machines by availability state and subscription ID
1110

1211
Returns the count of virtual machines (type `Microsoft.Compute/virtualMachines`) aggregated by their availability state across each of your subscriptions.
1312

@@ -39,9 +38,9 @@ Search-AzGraph -Query "HealthResources | where type =~ 'microsoft.resourcehealth
3938

4039
---
4140

42-
### List of virtual machines and associated availability states by Resource Ids
41+
### List of virtual machines and associated availability states by resource IDs
4342

44-
Returns the latest list of virtual machines (type `Microsoft.Compute/virtualMachines`) aggregated by availability state. The query also provides the associated Resource Id based on `properties.targetResourceId`, for easy debugging and mitigation. Availability states can be one of four values: Available, Unavailable, Degraded and Unknown. For more details on what each of the availability states mean, please see [Azure Resource Health overview](../../../../articles/service-health/resource-health-overview.md#health-status).
43+
Returns the latest list of virtual machines (type `Microsoft.Compute/virtualMachines`) aggregated by availability state. The query also provides the associated Resource ID based on `properties.targetResourceId`, for easy debugging and mitigation. Availability states can be one of four values: Available, Unavailable, Degraded, and Unknown. For more details on what each of the availability states mean, go to [Azure Resource Health overview](../resource-health-overview.md#health-status).
4544

4645
```kusto
4746
HealthResources
@@ -71,20 +70,20 @@ Search-AzGraph -Query "HealthResources | where type =~ 'microsoft.resourcehealth
7170

7271
---
7372

74-
### List of virtual machines by availability state and power state with Resource Ids and resource Groups
73+
### List of virtual machines by availability state and power state with resource IDs and resource groups
7574

76-
Returns list of virtual machines (type `Microsoft.Compute/virtualMachines`) aggregated on their power state and availability state to provide a cohesive state of health for your virtual machines. The query also provides details on the resource group and resource Id associated with each entry for detailed visibility into your resources.
75+
Returns list of virtual machines (type `Microsoft.Compute/virtualMachines`) aggregated on their power state and availability state to provide a cohesive state of health for your virtual machines. The query also provides details on the resource group and resource ID associated with each entry for detailed visibility into your resources.
7776

7877
```kusto
7978
Resources
8079
| where type =~ 'microsoft.compute/virtualmachines'
8180
| project resourceGroup, Id = tolower(id), PowerState = tostring( properties.extended.instanceView.powerState.code)
8281
| join kind=leftouter (
83-
HealthResources
84-
| where type =~ 'microsoft.resourcehealth/availabilitystatuses'
85-
| where tostring(properties.targetResourceType) =~ 'microsoft.compute/virtualmachines'
86-
| project targetResourceId = tolower(tostring(properties.targetResourceId)), AvailabilityState = tostring(properties.availabilityState))
87-
on $left.Id == $right.targetResourceId
82+
HealthResources
83+
| where type =~ 'microsoft.resourcehealth/availabilitystatuses'
84+
| where tostring(properties.targetResourceType) =~ 'microsoft.compute/virtualmachines'
85+
| project targetResourceId = tolower(tostring(properties.targetResourceId)), AvailabilityState = tostring(properties.availabilityState))
86+
on $left.Id == $right.targetResourceId
8887
| project-away targetResourceId
8988
| where PowerState != 'PowerState/deallocated'
9089
```
@@ -111,9 +110,9 @@ Search-AzGraph -Query "Resources | where type =~ 'microsoft.compute/virtualmachi
111110

112111
---
113112

114-
### List of virtual machines that are not Available by Resource Ids
113+
### List of virtual machines that aren't available by resource IDs
115114

116-
Returns the latest list of virtual machines (type `Microsoft.Compute/virtualMachines`) aggregated by their availability state. The populated list only highlights virtual machines whose availability state is not "Available" to ensure you are aware of all the concerning states your virtual machines are in. When all your virtual machines are Available, you can expect to receive no results.
115+
Returns the latest list of virtual machines (type `Microsoft.Compute/virtualMachines`) aggregated by their availability state. The populated list only highlights virtual machines whose availability state isn't _Available_ to ensure you're aware of all the concerning states your virtual machines are in. When all your virtual machines are Available, you can expect to receive no results.
117116

118117
```kusto
119118
HealthResources

articles/service-health/resource-graph-samples.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,19 @@ ms.custom: subject-resourcegraph-sample, devx-track-azurepowershell, devx-track-
77
---
88
# Azure Resource Graph sample queries for Azure Service Health
99

10-
This page is a collection of [Azure Resource Graph](../governance/resource-graph/overview.md) sample queries for Azure Service Health. For a complete list of Azure Resource Graph samples, see [Resource Graph samples by Category](../governance/resource-graph/samples/samples-by-category.md) and [Resource Graph samples by Table](../governance/resource-graph/samples/samples-by-table.md).
10+
This page is a collection of [Azure Resource Graph](../governance/resource-graph/overview.md) sample queries for Azure Service Health.
1111

1212
## Azure Service Health
1313

14-
[!INCLUDE [azure-resource-graph-samples-cat-servicehealth](../../includes/resource-graph/samples/bycat/azure-service-health.md)]
14+
[!INCLUDE [azure-resource-graph-samples-cat-servicehealth](./includes/azure-service-health.md)]
1515

1616
[!INCLUDE [azure-service-health-impacted-resources](includes/azure-service-health-impacted-resources.md)]
1717

1818
## Resource health
1919

20-
[!INCLUDE [azure-resource-graph-samples-cat-resourcehealth](../../includes/resource-graph/samples/bycat/resource-health.md)]
20+
[!INCLUDE [azure-resource-graph-samples-cat-resourcehealth](./includes/resource-health.md)]
2121

2222
## Next steps
2323

2424
- Learn more about the [query language](../governance/resource-graph/concepts/query-language.md).
2525
- Learn more about how to [explore resources](../governance/resource-graph/concepts/explore-resources.md).
26-
- See samples of [Starter language queries](../governance/resource-graph/samples/starter.md).
27-
- See samples of [Advanced language queries](../governance/resource-graph/samples/advanced.md).

0 commit comments

Comments
 (0)