Skip to content

Commit

Permalink
Update Orphan Resources.json
Browse files Browse the repository at this point in the history
Excluded Azure Site Recovery (aka: ASR) managed disks from the orphaned resources queries
  • Loading branch information
dolevshor committed Jun 14, 2022
1 parent bec6640 commit 8a3ebb9
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Workbook/Orphan Resources.json
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@
"type": 3,
"content": {
"version": "KqlItem/1.0",
"query": "Resources\r\n| where type has \"microsoft.compute/disks\"\r\n| extend diskState = tostring(properties.diskState)\r\n| where managedBy == \"\" or diskState == 'Unattached'\r\n| summarize count(type)",
"query": "Resources\r\n| where type has \"microsoft.compute/disks\"\r\n| extend diskState = tostring(properties.diskState)\r\n| where managedBy == \"\"\r\n| where not(name endswith \"-ASRReplica\" or name startswith \"ms-asr-\")\r\n| summarize count(type)",
"size": 4,
"title": "Disks",
"queryType": 1,
Expand Down Expand Up @@ -1065,7 +1065,7 @@
"type": 3,
"content": {
"version": "KqlItem/1.0",
"query": "Resources\r\n| where type has \"microsoft.compute/disks\"\r\n| extend diskState = tostring(properties.diskState)\r\n| where managedBy == \"\" or diskState == 'Unattached'\r\n| summarize count(type)",
"query": "Resources\r\n| where type has \"microsoft.compute/disks\"\r\n| extend diskState = tostring(properties.diskState)\r\n| where managedBy == \"\"\r\n| where not(name endswith \"-ASRReplica\" or name startswith \"ms-asr-\")\r\n| summarize count(type)",
"size": 4,
"title": "Total",
"queryType": 1,
Expand Down Expand Up @@ -1159,7 +1159,7 @@
"type": 3,
"content": {
"version": "KqlItem/1.0",
"query": "Resources\r\n| where type has \"microsoft.compute/disks\"\r\n| extend diskState = tostring(properties.diskState)\r\n| where managedBy == \"\" or diskState == 'Unattached'\r\n| extend SizeGB = tolong(properties.diskSizeGB)\r\n| summarize ['Total Disk Size (GB)']=sum(SizeGB)",
"query": "Resources\r\n| where type has \"microsoft.compute/disks\"\r\n| extend diskState = tostring(properties.diskState)\r\n| where managedBy == \"\"\r\n| where not(name endswith \"-ASRReplica\" or name startswith \"ms-asr-\")\r\n| extend SizeGB = tolong(properties.diskSizeGB)\r\n| summarize ['Total Disk Size (GB)']=sum(SizeGB)",
"size": 4,
"title": "Disks Size (GB)",
"queryType": 1,
Expand Down Expand Up @@ -1257,7 +1257,7 @@
"type": 3,
"content": {
"version": "KqlItem/1.0",
"query": "Resources\r\n| where type has \"microsoft.compute/disks\"\r\n| extend diskState = tostring(properties.diskState)\r\n| where managedBy == \"\" or diskState == 'Unattached'\r\n| summarize Count=count(type) by DiskType=tostring(sku.name)",
"query": "Resources\r\n| where type has \"microsoft.compute/disks\"\r\n| extend diskState = tostring(properties.diskState)\r\n| where managedBy == \"\"\r\n| where not(name endswith \"-ASRReplica\" or name startswith \"ms-asr-\")\r\n| summarize Count=count(type) by DiskType=tostring(sku.name)",
"size": 4,
"title": "Count by Disk Type",
"queryType": 1,
Expand Down Expand Up @@ -1374,7 +1374,7 @@
"type": 3,
"content": {
"version": "KqlItem/1.0",
"query": "Resources\r\n| where type has \"microsoft.compute/disks\"\r\n| extend diskState = tostring(properties.diskState)\r\n| where managedBy == \"\" or diskState == 'Unattached'\r\n| summarize Count=count(type) by location",
"query": "Resources\r\n| where type has \"microsoft.compute/disks\"\r\n| extend diskState = tostring(properties.diskState)\r\n| where managedBy == \"\"\r\n| where not(name endswith \"-ASRReplica\" or name startswith \"ms-asr-\")\r\n| summarize Count=count(type) by location",
"size": 4,
"title": "Count by Location",
"queryType": 1,
Expand Down Expand Up @@ -1491,7 +1491,7 @@
"type": 3,
"content": {
"version": "KqlItem/1.0",
"query": "Resources\r\n| where type has \"microsoft.compute/disks\"\r\n| extend diskState = tostring(properties.diskState)\r\n| where managedBy == \"\" or diskState == 'Unattached'\r\n| extend Details = pack_all()\r\n| project id, resourceGroup, diskState, sku.name, properties.diskSizeGB, location, tags, subscriptionId, Details\r\n",
"query": "Resources\r\n| where type has \"microsoft.compute/disks\"\r\n| extend diskState = tostring(properties.diskState)\r\n| where managedBy == \"\" or diskState == 'Unattached'\r\n| where name !has \"-ASRReplica\"\r\n| extend Details = pack_all()\r\n| project id, resourceGroup, diskState, sku.name, properties.diskSizeGB, location, tags, subscriptionId, Details\r\n",
"size": 3,
"title": "Orphan Disks",
"noDataMessage": "No oprhan disks found",
Expand Down

0 comments on commit 8a3ebb9

Please sign in to comment.