{ "version": "Notebook/1.0", "items": [ { "type": 1, "content": { "json": "## Orphan resources\r\nUse this report to analyze all your orphan resources." }, "name": "text - Title" }, { "type": 9, "content": { "version": "KqlParameterItem/1.0", "parameters": [ { "id": "a36f0b3d-8826-4bec-95a9-70ec6cb77713", "version": "KqlParameterItem/1.0", "name": "Subscriptions", "type": 6, "isRequired": true, "multiSelect": true, "quote": "'", "delimiter": ",", "value": [ "value::all" ], "typeSettings": { "additionalResourceOptions": [ "value::1", "value::all" ], "includeAll": true } } ], "style": "pills", "queryType": 0, "resourceType": "microsoft.operationalinsights/workspaces" }, "name": "parameters - Filter by Subscription" }, { "type": 11, "content": { "version": "LinkItem/1.0", "style": "tabs", "links": [ { "id": "f321b3dd-4d96-4aa7-ac57-5ad8ce236a48", "cellValue": "selectedTab", "linkTarget": "parameter", "linkLabel": "Overview", "subTarget": "overview", "style": "link" }, { "id": "e79a9ba1-8aca-4e4a-9df7-83123cae1627", "cellValue": "selectedTab", "linkTarget": "parameter", "linkLabel": "Disks", "subTarget": "disks", "preText": "IaaS", "style": "link" }, { "id": "ed3b708b-7054-424d-b32b-49451e04d36b", "cellValue": "selectedTab", "linkTarget": "parameter", "linkLabel": "Network Interfaces", "subTarget": "nics", "style": "link" }, { "id": "9bd4447c-8cac-4e8a-9f9b-bbcc99209b13", "cellValue": "selectedTab", "linkTarget": "parameter", "linkLabel": "Public IPs", "subTarget": "pip", "style": "link" }, { "id": "8192cd42-be72-4d18-b234-9e9fef4418dd", "cellValue": "selectedTab", "linkTarget": "parameter", "linkLabel": "Resource Groups", "subTarget": "rg", "style": "link" }, { "id": "1c2b6655-5c72-47bf-b4c6-9ea2665c07ef", "cellValue": "selectedTab", "linkTarget": "parameter", "linkLabel": "Network security groups", "subTarget": "nsg", "style": "link" }, { "id": "284d9e1f-d3f9-477e-8fac-0fad54c0b392", "cellValue": "selectedTab", "linkTarget": "parameter", "linkLabel": "Availability Sets", "subTarget": "avset", "style": "link" }, { "id": "34ec8f14-78d1-4de2-871e-215c074cb377", "cellValue": "selectedTab", "linkTarget": "parameter", "linkLabel": "Route Tables", "subTarget": "rt", "style": "link" }, { "id": "fa15d6a8-daf2-43ac-a492-53b5749e3f9d", "cellValue": "selectedTab", "linkTarget": "parameter", "linkLabel": "Load Balancers", "subTarget": "lb", "style": "link" }, { "id": "cdc078fb-097b-44e0-bd07-547f8322b6cb", "cellValue": "selectedTab", "linkTarget": "parameter", "linkLabel": "App Service Plans", "subTarget": "appsp", "style": "link" }, { "id": "5dcae591-edaa-4077-8f49-adb192de2993", "cellValue": "selectedTab", "linkTarget": "parameter", "linkLabel": "Front Door WAF Policy", "subTarget": "fdwafpolicy", "style": "link" }, { "id": "726ea119-4802-49c5-b504-def16c4727d0", "cellValue": "selectedTab", "linkTarget": "parameter", "linkLabel": "Traffic Manager Profiles", "subTarget": "tmprofile", "style": "link" } ] }, "name": "links - Tabs", "styleSettings": { "padding": "0 0 20px 0" } }, { "type": 1, "content": { "json": "## NoShow - Begin Overview" }, "conditionalVisibility": { "parameterName": "noshow", "comparison": "isEqualTo", "value": "noshow" }, "name": "text - NoShow Overview" }, { "type": 1, "content": { "json": "# Overview Azure Orphan Resources" }, "conditionalVisibility": { "parameterName": "selectedTab", "comparison": "isEqualTo", "value": "overview" }, "name": "text - Overview Azure Orphan Resources" }, { "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 == \"\"\r\n| where not(name endswith \"-ASRReplica\" or name startswith \"ms-asr-\" or name startswith \"asrseeddisk-\")\r\n| summarize count(type)", "size": 4, "title": "Disks", "queryType": 1, "resourceType": "microsoft.resourcegraph/resources", "crossComponentResources": [ "{Subscriptions}" ], "visualization": "tiles", "gridSettings": { "formatters": [ { "columnMatch": "$gen_group", "formatter": 13, "formatOptions": { "linkTarget": "Resource", "showIcon": true } }, { "columnMatch": "id", "formatter": 5 }, { "columnMatch": "subscriptionId", "formatter": 5 }, { "columnMatch": "Details", "formatter": 7, "formatOptions": { "linkTarget": "CellDetails", "linkLabel": "🔍 View Details", "linkIsContextBlade": true } } ], "rowLimit": 1000, "hierarchySettings": { "treeType": 1, "groupBy": [ "subscriptionId" ], "expandTopLevel": true, "finalBy": "id" } }, "sortBy": [], "tileSettings": { "titleContent": { "columnMatch": "count_type", "formatter": 12, "formatOptions": { "palette": "auto" } }, "showBorder": true, "sortOrderField": 2, "size": "auto" }, "graphSettings": { "type": 0, "topContent": { "columnMatch": "vmSize", "formatter": 1 }, "centerContent": { "columnMatch": "Count", "formatter": 1, "numberFormat": { "unit": 17, "options": { "maximumSignificantDigits": 3, "maximumFractionDigits": 2 } } } }, "textSettings": { "style": "bignumber" } }, "conditionalVisibility": { "parameterName": "selectedTab", "comparison": "isEqualTo", "value": "overview" }, "customWidth": "15", "name": "query - Orphan Disks Count" }, { "type": 3, "content": { "version": "KqlItem/1.0", "query": "Resources\r\n| where type has \"microsoft.network/networkinterfaces\"\r\n| where isnull(properties.privateEndpoint)\r\n| where isnull(properties.privateLinkService)\r\n| where properties.hostedWorkloads == \"[]\"\r\n| where properties !has 'virtualmachine'\r\n| summarize count(type)", "size": 4, "title": "Network Interfaces", "queryType": 1, "resourceType": "microsoft.resourcegraph/resources", "crossComponentResources": [ "{Subscriptions}" ], "visualization": "tiles", "gridSettings": { "formatters": [ { "columnMatch": "$gen_group", "formatter": 13, "formatOptions": { "linkTarget": "Resource", "showIcon": true } }, { "columnMatch": "id", "formatter": 5 }, { "columnMatch": "subscriptionId", "formatter": 5 }, { "columnMatch": "Details", "formatter": 7, "formatOptions": { "linkTarget": "CellDetails", "linkLabel": "🔍 View Details", "linkIsContextBlade": true } } ], "rowLimit": 1000, "hierarchySettings": { "treeType": 1, "groupBy": [ "subscriptionId" ], "expandTopLevel": true, "finalBy": "id" } }, "sortBy": [], "tileSettings": { "titleContent": { "columnMatch": "count_type", "formatter": 12, "formatOptions": { "palette": "auto" } }, "showBorder": true, "sortOrderField": 2, "size": "auto" }, "graphSettings": { "type": 0, "topContent": { "columnMatch": "vmSize", "formatter": 1 }, "centerContent": { "columnMatch": "Count", "formatter": 1, "numberFormat": { "unit": 17, "options": { "maximumSignificantDigits": 3, "maximumFractionDigits": 2 } } } }, "textSettings": { "style": "bignumber" } }, "conditionalVisibility": { "parameterName": "selectedTab", "comparison": "isEqualTo", "value": "overview" }, "customWidth": "15", "name": "query - Orphan Network Interfaces Count" }, { "type": 3, "content": { "version": "KqlItem/1.0", "query": "Resources\r\n| where type == \"microsoft.network/publicipaddresses\"\r\n| where properties.ipConfiguration == \"\" and properties.natGateway == \"\" and properties.publicIPPrefix == \"\"\r\n| summarize count(type)", "size": 4, "title": "Public IPs", "queryType": 1, "resourceType": "microsoft.resourcegraph/resources", "crossComponentResources": [ "{Subscriptions}" ], "visualization": "tiles", "gridSettings": { "formatters": [ { "columnMatch": "$gen_group", "formatter": 13, "formatOptions": { "linkTarget": "Resource", "showIcon": true } }, { "columnMatch": "id", "formatter": 5 }, { "columnMatch": "subscriptionId", "formatter": 5 }, { "columnMatch": "Details", "formatter": 7, "formatOptions": { "linkTarget": "CellDetails", "linkLabel": "🔍 View Details", "linkIsContextBlade": true } } ], "rowLimit": 1000, "hierarchySettings": { "treeType": 1, "groupBy": [ "subscriptionId" ], "expandTopLevel": true, "finalBy": "id" } }, "sortBy": [], "tileSettings": { "titleContent": { "columnMatch": "count_type", "formatter": 12, "formatOptions": { "palette": "auto" } }, "showBorder": true, "sortOrderField": 2, "size": "auto" }, "graphSettings": { "type": 0, "topContent": { "columnMatch": "vmSize", "formatter": 1 }, "centerContent": { "columnMatch": "Count", "formatter": 1, "numberFormat": { "unit": 17, "options": { "maximumSignificantDigits": 3, "maximumFractionDigits": 2 } } } }, "textSettings": { "style": "bignumber" } }, "conditionalVisibility": { "parameterName": "selectedTab", "comparison": "isEqualTo", "value": "overview" }, "customWidth": "15", "name": "query - Orphan Public IPs Count" }, { "type": 3, "content": { "version": "KqlItem/1.0", "query": "ResourceContainers\r\n| where type == \"microsoft.resources/subscriptions/resourcegroups\"\r\n| extend rgAndSub = strcat(resourceGroup, \"--\", subscriptionId)\r\n| join kind=leftouter (\r\n Resources\r\n | extend rgAndSub = strcat(resourceGroup, \"--\", subscriptionId)\r\n | summarize count() by rgAndSub\r\n) on rgAndSub\r\n| where isnull(count_)\r\n| summarize count(type)", "size": 4, "title": "Resource Groups", "queryType": 1, "resourceType": "microsoft.resourcegraph/resources", "crossComponentResources": [ "{Subscriptions}" ], "visualization": "tiles", "gridSettings": { "formatters": [ { "columnMatch": "$gen_group", "formatter": 13, "formatOptions": { "linkTarget": "Resource", "showIcon": true } }, { "columnMatch": "id", "formatter": 5 }, { "columnMatch": "subscriptionId", "formatter": 5 }, { "columnMatch": "Details", "formatter": 7, "formatOptions": { "linkTarget": "CellDetails", "linkLabel": "🔍 View Details", "linkIsContextBlade": true } } ], "rowLimit": 1000, "hierarchySettings": { "treeType": 1, "groupBy": [ "subscriptionId" ], "expandTopLevel": true, "finalBy": "id" } }, "sortBy": [], "tileSettings": { "titleContent": { "columnMatch": "count_type", "formatter": 12, "formatOptions": { "palette": "auto" } }, "showBorder": true, "sortOrderField": 2, "size": "auto" }, "graphSettings": { "type": 0, "topContent": { "columnMatch": "vmSize", "formatter": 1 }, "centerContent": { "columnMatch": "Count", "formatter": 1, "numberFormat": { "unit": 17, "options": { "maximumSignificantDigits": 3, "maximumFractionDigits": 2 } } } }, "textSettings": { "style": "bignumber" } }, "conditionalVisibility": { "parameterName": "selectedTab", "comparison": "isEqualTo", "value": "overview" }, "customWidth": "15", "name": "query - Orphan Resource Groups Count" }, { "type": 3, "content": { "version": "KqlItem/1.0", "query": "Resources\r\n| where type == \"microsoft.network/networksecuritygroups\" and isnull(properties.networkInterfaces) and isnull(properties.subnets)\r\n| summarize count(type)", "size": 4, "title": "Network Security Groups", "queryType": 1, "resourceType": "microsoft.resourcegraph/resources", "crossComponentResources": [ "{Subscriptions}" ], "visualization": "tiles", "gridSettings": { "formatters": [ { "columnMatch": "$gen_group", "formatter": 13, "formatOptions": { "linkTarget": "Resource", "showIcon": true } }, { "columnMatch": "id", "formatter": 5 }, { "columnMatch": "subscriptionId", "formatter": 5 }, { "columnMatch": "Details", "formatter": 7, "formatOptions": { "linkTarget": "CellDetails", "linkLabel": "🔍 View Details", "linkIsContextBlade": true } } ], "rowLimit": 1000, "hierarchySettings": { "treeType": 1, "groupBy": [ "subscriptionId" ], "expandTopLevel": true, "finalBy": "id" } }, "sortBy": [], "tileSettings": { "titleContent": { "columnMatch": "count_type", "formatter": 12, "formatOptions": { "palette": "auto" } }, "showBorder": true, "sortOrderField": 2, "size": "auto" }, "graphSettings": { "type": 0, "topContent": { "columnMatch": "vmSize", "formatter": 1 }, "centerContent": { "columnMatch": "Count", "formatter": 1, "numberFormat": { "unit": 17, "options": { "maximumSignificantDigits": 3, "maximumFractionDigits": 2 } } } }, "textSettings": { "style": "bignumber" } }, "conditionalVisibility": { "parameterName": "selectedTab", "comparison": "isEqualTo", "value": "overview" }, "customWidth": "15", "name": "query - Orphan Network Security Groups Count" }, { "type": 3, "content": { "version": "KqlItem/1.0", "query": "Resources\r\n| where type =~ 'Microsoft.Compute/availabilitySets'\r\n| where properties.virtualMachines == \"[]\"\r\n| summarize count(type)", "size": 4, "title": "Availability Sets", "queryType": 1, "resourceType": "microsoft.resourcegraph/resources", "crossComponentResources": [ "{Subscriptions}" ], "visualization": "tiles", "gridSettings": { "formatters": [ { "columnMatch": "$gen_group", "formatter": 13, "formatOptions": { "linkTarget": "Resource", "showIcon": true } }, { "columnMatch": "id", "formatter": 5 }, { "columnMatch": "subscriptionId", "formatter": 5 }, { "columnMatch": "Details", "formatter": 7, "formatOptions": { "linkTarget": "CellDetails", "linkLabel": "🔍 View Details", "linkIsContextBlade": true } } ], "rowLimit": 1000, "hierarchySettings": { "treeType": 1, "groupBy": [ "subscriptionId" ], "expandTopLevel": true, "finalBy": "id" } }, "sortBy": [], "tileSettings": { "titleContent": { "columnMatch": "count_type", "formatter": 12, "formatOptions": { "palette": "auto" } }, "showBorder": true, "sortOrderField": 2, "size": "auto" }, "graphSettings": { "type": 0, "topContent": { "columnMatch": "vmSize", "formatter": 1 }, "centerContent": { "columnMatch": "Count", "formatter": 1, "numberFormat": { "unit": 17, "options": { "maximumSignificantDigits": 3, "maximumFractionDigits": 2 } } } }, "textSettings": { "style": "bignumber" } }, "conditionalVisibility": { "parameterName": "selectedTab", "comparison": "isEqualTo", "value": "overview" }, "customWidth": "15", "name": "query - Orphan Availability Sets Count" }, { "type": 3, "content": { "version": "KqlItem/1.0", "query": "resources\r\n| where type == \"microsoft.network/routetables\"\r\n| where isnull(properties.subnets)\r\n| summarize count(type)", "size": 4, "title": "Route Tables", "queryType": 1, "resourceType": "microsoft.resourcegraph/resources", "crossComponentResources": [ "{Subscriptions}" ], "visualization": "tiles", "gridSettings": { "formatters": [ { "columnMatch": "$gen_group", "formatter": 13, "formatOptions": { "linkTarget": "Resource", "showIcon": true } }, { "columnMatch": "id", "formatter": 5 }, { "columnMatch": "subscriptionId", "formatter": 5 }, { "columnMatch": "Details", "formatter": 7, "formatOptions": { "linkTarget": "CellDetails", "linkLabel": "🔍 View Details", "linkIsContextBlade": true } } ], "rowLimit": 1000, "hierarchySettings": { "treeType": 1, "groupBy": [ "subscriptionId" ], "expandTopLevel": true, "finalBy": "id" } }, "sortBy": [], "tileSettings": { "titleContent": { "columnMatch": "count_type", "formatter": 12, "formatOptions": { "palette": "auto" } }, "showBorder": true, "sortOrderField": 2, "size": "auto" }, "graphSettings": { "type": 0, "topContent": { "columnMatch": "vmSize", "formatter": 1 }, "centerContent": { "columnMatch": "Count", "formatter": 1, "numberFormat": { "unit": 17, "options": { "maximumSignificantDigits": 3, "maximumFractionDigits": 2 } } } }, "textSettings": { "style": "bignumber" } }, "conditionalVisibility": { "parameterName": "selectedTab", "comparison": "isEqualTo", "value": "overview" }, "customWidth": "15", "name": "query - Orphan Route Tables Count" }, { "type": 3, "content": { "version": "KqlItem/1.0", "query": "resources\r\n| where type == \"microsoft.network/loadbalancers\"\r\n| where properties.backendAddressPools == \"[]\"\r\n| summarize count(type)", "size": 4, "title": "Load Balancers", "queryType": 1, "resourceType": "microsoft.resourcegraph/resources", "crossComponentResources": [ "{Subscriptions}" ], "visualization": "tiles", "gridSettings": { "formatters": [ { "columnMatch": "$gen_group", "formatter": 13, "formatOptions": { "linkTarget": "Resource", "showIcon": true } }, { "columnMatch": "id", "formatter": 5 }, { "columnMatch": "subscriptionId", "formatter": 5 }, { "columnMatch": "Details", "formatter": 7, "formatOptions": { "linkTarget": "CellDetails", "linkLabel": "🔍 View Details", "linkIsContextBlade": true } } ], "rowLimit": 1000, "hierarchySettings": { "treeType": 1, "groupBy": [ "subscriptionId" ], "expandTopLevel": true, "finalBy": "id" } }, "sortBy": [], "tileSettings": { "titleContent": { "columnMatch": "count_type", "formatter": 12, "formatOptions": { "palette": "auto" } }, "showBorder": true, "sortOrderField": 2, "size": "auto" }, "graphSettings": { "type": 0, "topContent": { "columnMatch": "vmSize", "formatter": 1 }, "centerContent": { "columnMatch": "Count", "formatter": 1, "numberFormat": { "unit": 17, "options": { "maximumSignificantDigits": 3, "maximumFractionDigits": 2 } } } }, "textSettings": { "style": "bignumber" } }, "conditionalVisibility": { "parameterName": "selectedTab", "comparison": "isEqualTo", "value": "overview" }, "customWidth": "15", "name": "query - Orphan Load Balancers Count" }, { "type": 3, "content": { "version": "KqlItem/1.0", "query": "resources\r\n| where type =~ \"microsoft.web/serverfarms\"\r\n| where properties.numberOfSites == 0\r\n| summarize count(type)", "size": 4, "title": "App Service Plans", "queryType": 1, "resourceType": "microsoft.resourcegraph/resources", "crossComponentResources": [ "{Subscriptions}" ], "visualization": "tiles", "gridSettings": { "formatters": [ { "columnMatch": "$gen_group", "formatter": 13, "formatOptions": { "linkTarget": "Resource", "showIcon": true } }, { "columnMatch": "id", "formatter": 5 }, { "columnMatch": "subscriptionId", "formatter": 5 }, { "columnMatch": "Details", "formatter": 7, "formatOptions": { "linkTarget": "CellDetails", "linkLabel": "🔍 View Details", "linkIsContextBlade": true } } ], "rowLimit": 1000, "hierarchySettings": { "treeType": 1, "groupBy": [ "subscriptionId" ], "expandTopLevel": true, "finalBy": "id" } }, "sortBy": [], "tileSettings": { "titleContent": { "columnMatch": "count_type", "formatter": 12, "formatOptions": { "palette": "auto" } }, "showBorder": true, "sortOrderField": 2, "size": "auto" }, "graphSettings": { "type": 0, "topContent": { "columnMatch": "vmSize", "formatter": 1 }, "centerContent": { "columnMatch": "Count", "formatter": 1, "numberFormat": { "unit": 17, "options": { "maximumSignificantDigits": 3, "maximumFractionDigits": 2 } } } }, "textSettings": { "style": "bignumber" } }, "conditionalVisibility": { "parameterName": "selectedTab", "comparison": "isEqualTo", "value": "overview" }, "customWidth": "15", "name": "query - Orphan App Service Plans Count" }, { "type": 3, "content": { "version": "KqlItem/1.0", "query": "resources\r\n| where type =~ \"microsoft.network/frontdoorwebapplicationfirewallpolicies\"\r\n| where properties.frontendEndpointLinks== \"[]\" and properties.securityPolicyLinks == \"[]\"\r\n| summarize count(type)", "size": 4, "title": "Front Door WAF Policy", "queryType": 1, "resourceType": "microsoft.resourcegraph/resources", "crossComponentResources": [ "{Subscriptions}" ], "visualization": "tiles", "gridSettings": { "formatters": [ { "columnMatch": "$gen_group", "formatter": 13, "formatOptions": { "linkTarget": "Resource", "showIcon": true } }, { "columnMatch": "id", "formatter": 5 }, { "columnMatch": "subscriptionId", "formatter": 5 }, { "columnMatch": "Details", "formatter": 7, "formatOptions": { "linkTarget": "CellDetails", "linkLabel": "🔍 View Details", "linkIsContextBlade": true } } ], "rowLimit": 1000, "hierarchySettings": { "treeType": 1, "groupBy": [ "subscriptionId" ], "expandTopLevel": true, "finalBy": "id" } }, "sortBy": [], "tileSettings": { "titleContent": { "columnMatch": "count_type", "formatter": 12, "formatOptions": { "palette": "auto" } }, "showBorder": true, "sortOrderField": 2, "size": "auto" }, "graphSettings": { "type": 0, "topContent": { "columnMatch": "vmSize", "formatter": 1 }, "centerContent": { "columnMatch": "Count", "formatter": 1, "numberFormat": { "unit": 17, "options": { "maximumSignificantDigits": 3, "maximumFractionDigits": 2 } } } }, "textSettings": { "style": "bignumber" } }, "conditionalVisibility": { "parameterName": "selectedTab", "comparison": "isEqualTo", "value": "overview" }, "customWidth": "15", "name": "query - Orphan Front Door WAF Policy Count" }, { "type": 3, "content": { "version": "KqlItem/1.0", "query": "resources\r\n| where type =~ \"microsoft.network/trafficmanagerprofiles\"\r\n| where properties.endpoints == \"[]\"\r\n| summarize count(type)", "size": 4, "title": "Traffic Manager Profiles", "queryType": 1, "resourceType": "microsoft.resourcegraph/resources", "crossComponentResources": [ "{Subscriptions}" ], "visualization": "tiles", "gridSettings": { "formatters": [ { "columnMatch": "$gen_group", "formatter": 13, "formatOptions": { "linkTarget": "Resource", "showIcon": true } }, { "columnMatch": "id", "formatter": 5 }, { "columnMatch": "subscriptionId", "formatter": 5 }, { "columnMatch": "Details", "formatter": 7, "formatOptions": { "linkTarget": "CellDetails", "linkLabel": "🔍 View Details", "linkIsContextBlade": true } } ], "rowLimit": 1000, "hierarchySettings": { "treeType": 1, "groupBy": [ "subscriptionId" ], "expandTopLevel": true, "finalBy": "id" } }, "sortBy": [], "tileSettings": { "titleContent": { "columnMatch": "count_type", "formatter": 12, "formatOptions": { "palette": "auto" } }, "showBorder": true, "sortOrderField": 2, "size": "auto" }, "graphSettings": { "type": 0, "topContent": { "columnMatch": "vmSize", "formatter": 1 }, "centerContent": { "columnMatch": "Count", "formatter": 1, "numberFormat": { "unit": 17, "options": { "maximumSignificantDigits": 3, "maximumFractionDigits": 2 } } } }, "textSettings": { "style": "bignumber" } }, "conditionalVisibility": { "parameterName": "selectedTab", "comparison": "isEqualTo", "value": "overview" }, "customWidth": "15", "name": "query - Orphan Traffic Manager Profiles Count" }, { "type": 1, "content": { "json": "## NoShow - End Overview\r\n\r\n\r\n## NoShow - Begin Disks" }, "conditionalVisibility": { "parameterName": "noshow", "comparison": "isEqualTo", "value": "noshow" }, "name": "text - NoShow Begin Disks" }, { "type": 1, "content": { "json": "# Orphan Disks" }, "conditionalVisibility": { "parameterName": "selectedTab", "comparison": "isEqualTo", "value": "disks" }, "name": "text - Title Orphan Disks" }, { "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 == \"\"\r\n| where not(name endswith \"-ASRReplica\" or name startswith \"ms-asr-\" or name startswith \"asrseeddisk-\")\r\n| summarize count(type)", "size": 4, "title": "Total", "queryType": 1, "resourceType": "microsoft.resourcegraph/resources", "crossComponentResources": [ "{Subscriptions}" ], "visualization": "tiles", "gridSettings": { "formatters": [ { "columnMatch": "$gen_group", "formatter": 13, "formatOptions": { "linkTarget": "Resource", "showIcon": true } }, { "columnMatch": "id", "formatter": 5 }, { "columnMatch": "subscriptionId", "formatter": 5 }, { "columnMatch": "Details", "formatter": 7, "formatOptions": { "linkTarget": "CellDetails", "linkLabel": "🔍 View Details", "linkIsContextBlade": true } } ], "rowLimit": 1000, "hierarchySettings": { "treeType": 1, "groupBy": [ "subscriptionId" ], "expandTopLevel": true, "finalBy": "id" } }, "sortBy": [], "tileSettings": { "titleContent": { "columnMatch": "count_type", "formatter": 12, "formatOptions": { "palette": "auto" } }, "showBorder": true, "sortOrderField": 2, "size": "auto" }, "graphSettings": { "type": 0, "topContent": { "columnMatch": "vmSize", "formatter": 1 }, "centerContent": { "columnMatch": "Count", "formatter": 1, "numberFormat": { "unit": 17, "options": { "maximumSignificantDigits": 3, "maximumFractionDigits": 2 } } } }, "textSettings": { "style": "bignumber" } }, "conditionalVisibility": { "parameterName": "selectedTab", "comparison": "isEqualTo", "value": "disks" }, "customWidth": "15", "name": "query - Orphan Disks Count" }, { "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 == \"\"\r\n| where not(name endswith \"-ASRReplica\" or name startswith \"ms-asr-\" or name startswith \"asrseeddisk-\")\r\n| extend SizeGB = tolong(properties.diskSizeGB)\r\n| summarize ['Total Disk Size (GB)']=sum(SizeGB)", "size": 4, "title": "Disks Size (GB)", "queryType": 1, "resourceType": "microsoft.resourcegraph/resources", "crossComponentResources": [ "{Subscriptions}" ], "visualization": "tiles", "gridSettings": { "formatters": [ { "columnMatch": "$gen_group", "formatter": 13, "formatOptions": { "linkTarget": "Resource", "showIcon": true } }, { "columnMatch": "id", "formatter": 5 }, { "columnMatch": "subscriptionId", "formatter": 5 }, { "columnMatch": "Details", "formatter": 7, "formatOptions": { "linkTarget": "CellDetails", "linkLabel": "🔍 View Details", "linkIsContextBlade": true } } ], "rowLimit": 1000, "hierarchySettings": { "treeType": 1, "groupBy": [ "subscriptionId" ], "expandTopLevel": true, "finalBy": "id" } }, "sortBy": [], "tileSettings": { "titleContent": { "columnMatch": "Total Disk Size (GB)", "formatter": 12, "formatOptions": { "palette": "auto", "compositeBarSettings": { "labelText": "", "columnSettings": [] } } }, "showBorder": true, "sortOrderField": 2, "size": "auto" }, "graphSettings": { "type": 0, "topContent": { "columnMatch": "vmSize", "formatter": 1 }, "centerContent": { "columnMatch": "Count", "formatter": 1, "numberFormat": { "unit": 17, "options": { "maximumSignificantDigits": 3, "maximumFractionDigits": 2 } } } }, "textSettings": { "style": "bignumber" } }, "conditionalVisibility": { "parameterName": "selectedTab", "comparison": "isEqualTo", "value": "disks" }, "customWidth": "15", "name": "query - Total Orphan Disk Size (GB)" }, { "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 == \"\"\r\n| where not(name endswith \"-ASRReplica\" or name startswith \"ms-asr-\" or name startswith \"asrseeddisk-\")\r\n| summarize Count=count(type) by DiskType=tostring(sku.name)", "size": 4, "title": "Count by Disk Type", "queryType": 1, "resourceType": "microsoft.resourcegraph/resources", "crossComponentResources": [ "{Subscriptions}" ], "visualization": "piechart", "gridSettings": { "formatters": [ { "columnMatch": "$gen_group", "formatter": 13, "formatOptions": { "linkTarget": "Resource", "showIcon": true } }, { "columnMatch": "id", "formatter": 5 }, { "columnMatch": "subscriptionId", "formatter": 5 }, { "columnMatch": "Details", "formatter": 7, "formatOptions": { "linkTarget": "CellDetails", "linkLabel": "🔍 View Details", "linkIsContextBlade": true } } ], "rowLimit": 1000, "hierarchySettings": { "treeType": 1, "groupBy": [ "subscriptionId" ], "expandTopLevel": true, "finalBy": "id" } }, "sortBy": [], "tileSettings": { "titleContent": { "columnMatch": "DiskType", "formatter": 1 }, "leftContent": { "columnMatch": "Count", "formatter": 12, "formatOptions": { "palette": "auto" }, "numberFormat": { "unit": 17, "options": { "maximumSignificantDigits": 3, "maximumFractionDigits": 2 } } }, "showBorder": true }, "graphSettings": { "type": 0, "topContent": { "columnMatch": "vmSize", "formatter": 1 }, "centerContent": { "columnMatch": "Count", "formatter": 1, "numberFormat": { "unit": 17, "options": { "maximumSignificantDigits": 3, "maximumFractionDigits": 2 } } } }, "chartSettings": { "showMetrics": false, "showLegend": true }, "mapSettings": { "locInfo": "LatLong", "sizeSettings": "Count", "sizeAggregation": "Sum", "legendMetric": "Count", "legendAggregation": "Sum", "itemColorSettings": { "type": "heatmap", "colorAggregation": "Sum", "nodeColorField": "Count", "heatmapPalette": "greenRed" } } }, "conditionalVisibility": { "parameterName": "selectedTab", "comparison": "isEqualTo", "value": "disks" }, "customWidth": "30", "name": "query - Orphan Disks by DiskType" }, { "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 == \"\"\r\n| where not(name endswith \"-ASRReplica\" or name startswith \"ms-asr-\" or name startswith \"asrseeddisk-\")\r\n| summarize Count=count(type) by location", "size": 4, "title": "Count by Location", "queryType": 1, "resourceType": "microsoft.resourcegraph/resources", "crossComponentResources": [ "{Subscriptions}" ], "visualization": "piechart", "gridSettings": { "formatters": [ { "columnMatch": "$gen_group", "formatter": 13, "formatOptions": { "linkTarget": "Resource", "showIcon": true } }, { "columnMatch": "id", "formatter": 5 }, { "columnMatch": "subscriptionId", "formatter": 5 }, { "columnMatch": "Details", "formatter": 7, "formatOptions": { "linkTarget": "CellDetails", "linkLabel": "🔍 View Details", "linkIsContextBlade": true } } ], "rowLimit": 1000, "hierarchySettings": { "treeType": 1, "groupBy": [ "subscriptionId" ], "expandTopLevel": true, "finalBy": "id" } }, "sortBy": [], "tileSettings": { "titleContent": { "columnMatch": "DiskType", "formatter": 1 }, "leftContent": { "columnMatch": "Count", "formatter": 12, "formatOptions": { "palette": "auto" }, "numberFormat": { "unit": 17, "options": { "maximumSignificantDigits": 3, "maximumFractionDigits": 2 } } }, "showBorder": true }, "graphSettings": { "type": 0, "topContent": { "columnMatch": "vmSize", "formatter": 1 }, "centerContent": { "columnMatch": "Count", "formatter": 1, "numberFormat": { "unit": 17, "options": { "maximumSignificantDigits": 3, "maximumFractionDigits": 2 } } } }, "chartSettings": { "showMetrics": false, "showLegend": true }, "mapSettings": { "locInfo": "LatLong", "sizeSettings": "Count", "sizeAggregation": "Sum", "legendMetric": "Count", "legendAggregation": "Sum", "itemColorSettings": { "type": "heatmap", "colorAggregation": "Sum", "nodeColorField": "Count", "heatmapPalette": "greenRed" } } }, "conditionalVisibility": { "parameterName": "selectedTab", "comparison": "isEqualTo", "value": "disks" }, "customWidth": "30", "name": "query - Orphan Disks by Location" }, { "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| where not(name endswith \"-ASRReplica\" or name startswith \"ms-asr-\" or name startswith \"asrseeddisk-\")\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", "showExportToExcel": true, "queryType": 1, "resourceType": "microsoft.resourcegraph/resources", "crossComponentResources": [ "{Subscriptions}" ], "gridSettings": { "formatters": [ { "columnMatch": "$gen_group", "formatter": 13, "formatOptions": { "linkTarget": "Resource", "showIcon": true } }, { "columnMatch": "id", "formatter": 5 }, { "columnMatch": "subscriptionId", "formatter": 5 }, { "columnMatch": "Details", "formatter": 7, "formatOptions": { "linkTarget": "CellDetails", "linkLabel": "🔍 View Details", "linkIsContextBlade": true } } ], "rowLimit": 1000, "filter": true, "hierarchySettings": { "treeType": 1, "groupBy": [ "subscriptionId" ], "expandTopLevel": true, "finalBy": "id" }, "sortBy": [ { "itemKey": "$gen_link_sku_name_4", "sortOrder": 1 } ], "labelSettings": [ { "columnId": "resourceGroup", "label": "Resource Group" }, { "columnId": "diskState", "label": "Disk State" }, { "columnId": "sku_name", "label": "Disk Type" }, { "columnId": "properties_diskSizeGB", "label": "Disk Size (GB)" }, { "columnId": "location", "label": "Location" }, { "columnId": "tags", "label": "Tags" }, { "columnId": "subscriptionId", "label": "Subscription" } ] }, "sortBy": [ { "itemKey": "$gen_link_sku_name_4", "sortOrder": 1 } ], "tileSettings": { "titleContent": { "columnMatch": "vmSize", "formatter": 1, "formatOptions": { "showIcon": true } }, "leftContent": { "columnMatch": "Count", "formatter": 12, "formatOptions": { "palette": "auto", "showIcon": true }, "numberFormat": { "unit": 17, "options": { "maximumSignificantDigits": 3, "maximumFractionDigits": 2 } } }, "showBorder": true }, "graphSettings": { "type": 0, "topContent": { "columnMatch": "vmSize", "formatter": 1 }, "centerContent": { "columnMatch": "Count", "formatter": 1, "numberFormat": { "unit": 17, "options": { "maximumSignificantDigits": 3, "maximumFractionDigits": 2 } } } } }, "conditionalVisibility": { "parameterName": "selectedTab", "comparison": "isEqualTo", "value": "disks" }, "name": "query - Orphan Disks" }, { "type": 1, "content": { "json": "## NoShow - End Disks\r\n\r\n\r\n## NoShow - Begin Network Interfaces" }, "conditionalVisibility": { "parameterName": "noshow", "comparison": "isEqualTo", "value": "noshow" }, "name": "text - NoShow Begin Netowork Interfaces" }, { "type": 1, "content": { "json": "# Orphan Network Interfaces" }, "conditionalVisibility": { "parameterName": "selectedTab", "comparison": "isEqualTo", "value": "nics" }, "name": "text - Title Network interfaces" }, { "type": 3, "content": { "version": "KqlItem/1.0", "query": "Resources\r\n| where type has \"microsoft.network/networkinterfaces\"\r\n| where isnull(properties.privateEndpoint)\r\n| where isnull(properties.privateLinkService)\r\n| where properties.hostedWorkloads == \"[]\"\r\n| where properties !has 'virtualmachine'\r\n| summarize count(type)", "size": 4, "title": "Total", "queryType": 1, "resourceType": "microsoft.resourcegraph/resources", "crossComponentResources": [ "{Subscriptions}" ], "visualization": "tiles", "gridSettings": { "formatters": [ { "columnMatch": "$gen_group", "formatter": 13, "formatOptions": { "linkTarget": "Resource", "showIcon": true } }, { "columnMatch": "id", "formatter": 5 }, { "columnMatch": "subscriptionId", "formatter": 5 }, { "columnMatch": "Details", "formatter": 7, "formatOptions": { "linkTarget": "CellDetails", "linkLabel": "🔍 View Details", "linkIsContextBlade": true } } ], "rowLimit": 1000, "hierarchySettings": { "treeType": 1, "groupBy": [ "subscriptionId" ], "expandTopLevel": true, "finalBy": "id" } }, "sortBy": [], "tileSettings": { "titleContent": { "columnMatch": "count_type", "formatter": 12, "formatOptions": { "palette": "auto" } }, "showBorder": true, "sortOrderField": 2, "size": "auto" }, "graphSettings": { "type": 0, "topContent": { "columnMatch": "vmSize", "formatter": 1 }, "centerContent": { "columnMatch": "Count", "formatter": 1, "numberFormat": { "unit": 17, "options": { "maximumSignificantDigits": 3, "maximumFractionDigits": 2 } } } }, "textSettings": { "style": "bignumber" } }, "conditionalVisibility": { "parameterName": "selectedTab", "comparison": "isEqualTo", "value": "nics" }, "customWidth": "15", "name": "query - Orphan Network Interfaces Count" }, { "type": 3, "content": { "version": "KqlItem/1.0", "query": "Resources\r\n| where type has \"microsoft.network/networkinterfaces\"\r\n| where isnull(properties.privateEndpoint)\r\n| where isnull(properties.privateLinkService)\r\n| where properties.hostedWorkloads == \"[]\"\r\n| where properties !has 'virtualmachine'\r\n| summarize count(type) by location", "size": 4, "title": "Count by Location", "queryType": 1, "resourceType": "microsoft.resourcegraph/resources", "crossComponentResources": [ "{Subscriptions}" ], "visualization": "piechart", "gridSettings": { "formatters": [ { "columnMatch": "$gen_group", "formatter": 13, "formatOptions": { "linkTarget": "Resource", "showIcon": true } }, { "columnMatch": "id", "formatter": 5 }, { "columnMatch": "subscriptionId", "formatter": 5 }, { "columnMatch": "Details", "formatter": 7, "formatOptions": { "linkTarget": "CellDetails", "linkLabel": "🔍 View Details", "linkIsContextBlade": true } } ], "rowLimit": 1000, "hierarchySettings": { "treeType": 1, "groupBy": [ "subscriptionId" ], "expandTopLevel": true, "finalBy": "id" } }, "sortBy": [], "tileSettings": { "titleContent": { "columnMatch": "DiskType", "formatter": 1 }, "leftContent": { "columnMatch": "Count", "formatter": 12, "formatOptions": { "palette": "auto" }, "numberFormat": { "unit": 17, "options": { "maximumSignificantDigits": 3, "maximumFractionDigits": 2 } } }, "showBorder": true }, "graphSettings": { "type": 0, "topContent": { "columnMatch": "vmSize", "formatter": 1 }, "centerContent": { "columnMatch": "Count", "formatter": 1, "numberFormat": { "unit": 17, "options": { "maximumSignificantDigits": 3, "maximumFractionDigits": 2 } } } }, "chartSettings": { "showMetrics": false, "showLegend": true }, "mapSettings": { "locInfo": "LatLong", "sizeSettings": "Count", "sizeAggregation": "Sum", "legendMetric": "Count", "legendAggregation": "Sum", "itemColorSettings": { "type": "heatmap", "colorAggregation": "Sum", "nodeColorField": "Count", "heatmapPalette": "greenRed" } } }, "conditionalVisibility": { "parameterName": "selectedTab", "comparison": "isEqualTo", "value": "nics" }, "customWidth": "30", "name": "query - Orphan Network Interfaces by Location" }, { "type": 3, "content": { "version": "KqlItem/1.0", "query": "Resources\r\n| where type has \"microsoft.network/networkinterfaces\"\r\n| where isnull(properties.privateEndpoint)\r\n| where isnull(properties.privateLinkService)\r\n| where properties.hostedWorkloads == \"[]\"\r\n| where properties !has 'virtualmachine'\r\n| extend Details = pack_all()\r\n| project Resource=id, resourceGroup, location, tags, subscriptionId, Details", "size": 3, "title": "Orphan Network Interfaces", "noDataMessage": "No oprhan Network Interfaces found", "showExportToExcel": true, "queryType": 1, "resourceType": "microsoft.resourcegraph/resources", "crossComponentResources": [ "{Subscriptions}" ], "gridSettings": { "formatters": [ { "columnMatch": "$gen_group", "formatter": 13, "formatOptions": { "linkTarget": "Resource", "linkIsContextBlade": true, "showIcon": true } }, { "columnMatch": "Resource", "formatter": 5 }, { "columnMatch": "subscriptionId", "formatter": 5 }, { "columnMatch": "Details", "formatter": 7, "formatOptions": { "linkTarget": "CellDetails", "linkLabel": "🔍 View Details", "linkIsContextBlade": true } } ], "rowLimit": 1000, "filter": true, "hierarchySettings": { "treeType": 1, "groupBy": [ "subscriptionId" ], "expandTopLevel": true, "finalBy": "Resource" }, "sortBy": [ { "itemKey": "resourceGroup", "sortOrder": 2 } ], "labelSettings": [ { "columnId": "resourceGroup", "label": "Resource Group" }, { "columnId": "location", "label": "Location" }, { "columnId": "tags", "label": "Tags" }, { "columnId": "subscriptionId", "label": "Subscription" } ] }, "sortBy": [ { "itemKey": "resourceGroup", "sortOrder": 2 } ], "tileSettings": { "titleContent": { "columnMatch": "vmSize", "formatter": 1, "formatOptions": { "showIcon": true } }, "leftContent": { "columnMatch": "Count", "formatter": 12, "formatOptions": { "palette": "auto", "showIcon": true }, "numberFormat": { "unit": 17, "options": { "maximumSignificantDigits": 3, "maximumFractionDigits": 2 } } }, "showBorder": true }, "graphSettings": { "type": 0, "topContent": { "columnMatch": "vmSize", "formatter": 1 }, "centerContent": { "columnMatch": "Count", "formatter": 1, "numberFormat": { "unit": 17, "options": { "maximumSignificantDigits": 3, "maximumFractionDigits": 2 } } } } }, "conditionalVisibility": { "parameterName": "selectedTab", "comparison": "isEqualTo", "value": "nics" }, "name": "query - Orphan Network Interfaces" }, { "type": 1, "content": { "json": "## NoShow - End Network Interfaces\r\n\r\n\r\n## NoShow - Begin Public IPs" }, "conditionalVisibility": { "parameterName": "noshow", "comparison": "isEqualTo", "value": "noshow" }, "name": "text - NoShow Begin Public IPs" }, { "type": 1, "content": { "json": "# Orphan Public IPs" }, "conditionalVisibility": { "parameterName": "selectedTab", "comparison": "isEqualTo", "value": "pip" }, "name": "text - Title Orphan Public IPs" }, { "type": 3, "content": { "version": "KqlItem/1.0", "query": "Resources\r\n| where type == \"microsoft.network/publicipaddresses\"\r\n| where properties.ipConfiguration == \"\" and properties.natGateway == \"\" and properties.publicIPPrefix == \"\"\r\n| summarize count(type)", "size": 4, "title": "Total", "queryType": 1, "resourceType": "microsoft.resourcegraph/resources", "crossComponentResources": [ "{Subscriptions}" ], "visualization": "tiles", "gridSettings": { "formatters": [ { "columnMatch": "$gen_group", "formatter": 13, "formatOptions": { "linkTarget": "Resource", "showIcon": true } }, { "columnMatch": "id", "formatter": 5 }, { "columnMatch": "subscriptionId", "formatter": 5 }, { "columnMatch": "Details", "formatter": 7, "formatOptions": { "linkTarget": "CellDetails", "linkLabel": "🔍 View Details", "linkIsContextBlade": true } } ], "rowLimit": 1000, "hierarchySettings": { "treeType": 1, "groupBy": [ "subscriptionId" ], "expandTopLevel": true, "finalBy": "id" } }, "sortBy": [], "tileSettings": { "titleContent": { "columnMatch": "count_type", "formatter": 12, "formatOptions": { "palette": "auto" } }, "showBorder": true, "sortOrderField": 2, "size": "auto" }, "graphSettings": { "type": 0, "topContent": { "columnMatch": "vmSize", "formatter": 1 }, "centerContent": { "columnMatch": "Count", "formatter": 1, "numberFormat": { "unit": 17, "options": { "maximumSignificantDigits": 3, "maximumFractionDigits": 2 } } } }, "textSettings": { "style": "bignumber" } }, "conditionalVisibility": { "parameterName": "selectedTab", "comparison": "isEqualTo", "value": "pip" }, "customWidth": "15", "name": "query - Orphan Public IPs Count" }, { "type": 3, "content": { "version": "KqlItem/1.0", "query": "Resources\r\n| where type == \"microsoft.network/publicipaddresses\"\r\n| where properties.ipConfiguration == \"\" and properties.natGateway == \"\" and properties.publicIPPrefix == \"\"\r\n| summarize count(type) by tostring(sku.name)", "size": 4, "title": "Count by Type", "queryType": 1, "resourceType": "microsoft.resourcegraph/resources", "crossComponentResources": [ "{Subscriptions}" ], "visualization": "piechart", "gridSettings": { "formatters": [ { "columnMatch": "$gen_group", "formatter": 13, "formatOptions": { "linkTarget": "Resource", "showIcon": true } }, { "columnMatch": "id", "formatter": 5 }, { "columnMatch": "subscriptionId", "formatter": 5 }, { "columnMatch": "Details", "formatter": 7, "formatOptions": { "linkTarget": "CellDetails", "linkLabel": "🔍 View Details", "linkIsContextBlade": true } } ], "rowLimit": 1000, "hierarchySettings": { "treeType": 1, "groupBy": [ "subscriptionId" ], "expandTopLevel": true, "finalBy": "id" } }, "sortBy": [], "tileSettings": { "titleContent": { "columnMatch": "DiskType", "formatter": 1 }, "leftContent": { "columnMatch": "Count", "formatter": 12, "formatOptions": { "palette": "auto" }, "numberFormat": { "unit": 17, "options": { "maximumSignificantDigits": 3, "maximumFractionDigits": 2 } } }, "showBorder": true }, "graphSettings": { "type": 0, "topContent": { "columnMatch": "vmSize", "formatter": 1 }, "centerContent": { "columnMatch": "Count", "formatter": 1, "numberFormat": { "unit": 17, "options": { "maximumSignificantDigits": 3, "maximumFractionDigits": 2 } } } }, "chartSettings": { "showMetrics": false, "showLegend": true }, "mapSettings": { "locInfo": "LatLong", "sizeSettings": "Count", "sizeAggregation": "Sum", "legendMetric": "Count", "legendAggregation": "Sum", "itemColorSettings": { "type": "heatmap", "colorAggregation": "Sum", "nodeColorField": "Count", "heatmapPalette": "greenRed" } } }, "conditionalVisibility": { "parameterName": "selectedTab", "comparison": "isEqualTo", "value": "pip" }, "customWidth": "25", "name": "query - Orphan Public IPs by Type" }, { "type": 3, "content": { "version": "KqlItem/1.0", "query": "Resources\r\n| where type == \"microsoft.network/publicipaddresses\"\r\n| where properties.ipConfiguration == \"\" and properties.natGateway == \"\" and properties.publicIPPrefix == \"\"\r\n| summarize count(type) by AllocationMethod=tostring(properties.publicIPAllocationMethod)", "size": 4, "title": "Count by Allocation Method", "queryType": 1, "resourceType": "microsoft.resourcegraph/resources", "crossComponentResources": [ "{Subscriptions}" ], "visualization": "piechart", "gridSettings": { "formatters": [ { "columnMatch": "$gen_group", "formatter": 13, "formatOptions": { "linkTarget": "Resource", "showIcon": true } }, { "columnMatch": "id", "formatter": 5 }, { "columnMatch": "subscriptionId", "formatter": 5 }, { "columnMatch": "Details", "formatter": 7, "formatOptions": { "linkTarget": "CellDetails", "linkLabel": "🔍 View Details", "linkIsContextBlade": true } } ], "rowLimit": 1000, "hierarchySettings": { "treeType": 1, "groupBy": [ "subscriptionId" ], "expandTopLevel": true, "finalBy": "id" } }, "sortBy": [], "tileSettings": { "titleContent": { "columnMatch": "DiskType", "formatter": 1 }, "leftContent": { "columnMatch": "Count", "formatter": 12, "formatOptions": { "palette": "auto" }, "numberFormat": { "unit": 17, "options": { "maximumSignificantDigits": 3, "maximumFractionDigits": 2 } } }, "showBorder": true }, "graphSettings": { "type": 0, "topContent": { "columnMatch": "vmSize", "formatter": 1 }, "centerContent": { "columnMatch": "Count", "formatter": 1, "numberFormat": { "unit": 17, "options": { "maximumSignificantDigits": 3, "maximumFractionDigits": 2 } } } }, "chartSettings": { "showMetrics": false, "showLegend": true }, "mapSettings": { "locInfo": "LatLong", "sizeSettings": "Count", "sizeAggregation": "Sum", "legendMetric": "Count", "legendAggregation": "Sum", "itemColorSettings": { "type": "heatmap", "colorAggregation": "Sum", "nodeColorField": "Count", "heatmapPalette": "greenRed" } } }, "conditionalVisibility": { "parameterName": "selectedTab", "comparison": "isEqualTo", "value": "pip" }, "customWidth": "25", "name": "query - Orphan Public IPs by Allocation Method" }, { "type": 3, "content": { "version": "KqlItem/1.0", "query": "Resources\r\n| where type == \"microsoft.network/publicipaddresses\"\r\n| where properties.ipConfiguration == \"\" and properties.natGateway == \"\" and properties.publicIPPrefix == \"\"\r\n| summarize count(type) by location", "size": 4, "title": "Count by Location", "queryType": 1, "resourceType": "microsoft.resourcegraph/resources", "crossComponentResources": [ "{Subscriptions}" ], "visualization": "piechart", "gridSettings": { "formatters": [ { "columnMatch": "$gen_group", "formatter": 13, "formatOptions": { "linkTarget": "Resource", "showIcon": true } }, { "columnMatch": "id", "formatter": 5 }, { "columnMatch": "subscriptionId", "formatter": 5 }, { "columnMatch": "Details", "formatter": 7, "formatOptions": { "linkTarget": "CellDetails", "linkLabel": "🔍 View Details", "linkIsContextBlade": true } } ], "rowLimit": 1000, "hierarchySettings": { "treeType": 1, "groupBy": [ "subscriptionId" ], "expandTopLevel": true, "finalBy": "id" } }, "sortBy": [], "tileSettings": { "titleContent": { "columnMatch": "DiskType", "formatter": 1 }, "leftContent": { "columnMatch": "Count", "formatter": 12, "formatOptions": { "palette": "auto" }, "numberFormat": { "unit": 17, "options": { "maximumSignificantDigits": 3, "maximumFractionDigits": 2 } } }, "showBorder": true }, "graphSettings": { "type": 0, "topContent": { "columnMatch": "vmSize", "formatter": 1 }, "centerContent": { "columnMatch": "Count", "formatter": 1, "numberFormat": { "unit": 17, "options": { "maximumSignificantDigits": 3, "maximumFractionDigits": 2 } } } }, "chartSettings": { "showMetrics": false, "showLegend": true }, "mapSettings": { "locInfo": "LatLong", "sizeSettings": "Count", "sizeAggregation": "Sum", "legendMetric": "Count", "legendAggregation": "Sum", "itemColorSettings": { "type": "heatmap", "colorAggregation": "Sum", "nodeColorField": "Count", "heatmapPalette": "greenRed" } } }, "conditionalVisibility": { "parameterName": "selectedTab", "comparison": "isEqualTo", "value": "pip" }, "customWidth": "25", "name": "query - Orphan Public IPs by Location" }, { "type": 3, "content": { "version": "KqlItem/1.0", "query": "Resources\r\n| where type == \"microsoft.network/publicipaddresses\"\r\n| where properties.ipConfiguration == \"\" and properties.natGateway == \"\" and properties.publicIPPrefix == \"\"\r\n| extend Details = pack_all()\r\n| project Resource=id, resourceGroup, location, subscriptionId, tostring(sku.name), AllocationMethod=tostring(properties.publicIPAllocationMethod), tags, Details", "size": 3, "title": "Orphan Public IPs", "noDataMessage": "No oprhan Public IPs found", "showExportToExcel": true, "queryType": 1, "resourceType": "microsoft.resourcegraph/resources", "crossComponentResources": [ "{Subscriptions}" ], "gridSettings": { "formatters": [ { "columnMatch": "$gen_group", "formatter": 13, "formatOptions": { "linkTarget": "Resource", "linkIsContextBlade": true, "showIcon": true } }, { "columnMatch": "Resource", "formatter": 5 }, { "columnMatch": "subscriptionId", "formatter": 5 }, { "columnMatch": "Details", "formatter": 7, "formatOptions": { "linkTarget": "CellDetails", "linkLabel": "🔍 View Details", "linkIsContextBlade": true } } ], "rowLimit": 1000, "filter": true, "hierarchySettings": { "treeType": 1, "groupBy": [ "subscriptionId" ], "expandTopLevel": true, "finalBy": "Resource" }, "sortBy": [ { "itemKey": "resourceGroup", "sortOrder": 2 } ], "labelSettings": [ { "columnId": "Resource", "label": "Public IP Name" }, { "columnId": "resourceGroup", "label": "Resource Group" }, { "columnId": "location", "label": "Location" }, { "columnId": "subscriptionId", "label": "Subscription" }, { "columnId": "sku_name", "label": "Type" }, { "columnId": "tags", "label": "Tags" } ] }, "sortBy": [ { "itemKey": "resourceGroup", "sortOrder": 2 } ], "tileSettings": { "titleContent": { "columnMatch": "vmSize", "formatter": 1, "formatOptions": { "showIcon": true } }, "leftContent": { "columnMatch": "Count", "formatter": 12, "formatOptions": { "palette": "auto", "showIcon": true }, "numberFormat": { "unit": 17, "options": { "maximumSignificantDigits": 3, "maximumFractionDigits": 2 } } }, "showBorder": true }, "graphSettings": { "type": 0, "topContent": { "columnMatch": "vmSize", "formatter": 1 }, "centerContent": { "columnMatch": "Count", "formatter": 1, "numberFormat": { "unit": 17, "options": { "maximumSignificantDigits": 3, "maximumFractionDigits": 2 } } } } }, "conditionalVisibility": { "parameterName": "selectedTab", "comparison": "isEqualTo", "value": "pip" }, "name": "query - Orphan Public IPs" }, { "type": 1, "content": { "json": "## NoShow - End Public IPs\r\n\r\n## NoShow - Begin Resource Groups" }, "conditionalVisibility": { "parameterName": "noshow", "comparison": "isEqualTo", "value": "noshow" }, "name": "text - NoShow Begin Resource Groups" }, { "type": 1, "content": { "json": "# Orphan Reource Groups" }, "conditionalVisibility": { "parameterName": "selectedTab", "comparison": "isEqualTo", "value": "rg" }, "name": "text - Title Orphan Resource Groups" }, { "type": 3, "content": { "version": "KqlItem/1.0", "query": "ResourceContainers\r\n | where type == \"microsoft.resources/subscriptions/resourcegroups\"\r\n | extend rgAndSub = strcat(resourceGroup, \"--\", subscriptionId)\r\n | join kind=leftouter (\r\n Resources\r\n | extend rgAndSub = strcat(resourceGroup, \"--\", subscriptionId)\r\n | summarize count() by rgAndSub\r\n ) on rgAndSub\r\n | where isnull(count_)\r\n | summarize count(type)", "size": 4, "title": "Total", "queryType": 1, "resourceType": "microsoft.resourcegraph/resources", "crossComponentResources": [ "{Subscriptions}" ], "visualization": "tiles", "gridSettings": { "formatters": [ { "columnMatch": "$gen_group", "formatter": 13, "formatOptions": { "linkTarget": "Resource", "showIcon": true } }, { "columnMatch": "id", "formatter": 5 }, { "columnMatch": "subscriptionId", "formatter": 5 }, { "columnMatch": "Details", "formatter": 7, "formatOptions": { "linkTarget": "CellDetails", "linkLabel": "🔍 View Details", "linkIsContextBlade": true } } ], "rowLimit": 1000, "hierarchySettings": { "treeType": 1, "groupBy": [ "subscriptionId" ], "expandTopLevel": true, "finalBy": "id" } }, "sortBy": [], "tileSettings": { "titleContent": { "columnMatch": "count_type", "formatter": 12, "formatOptions": { "palette": "auto" } }, "showBorder": true, "sortOrderField": 2, "size": "auto" }, "graphSettings": { "type": 0, "topContent": { "columnMatch": "vmSize", "formatter": 1 }, "centerContent": { "columnMatch": "Count", "formatter": 1, "numberFormat": { "unit": 17, "options": { "maximumSignificantDigits": 3, "maximumFractionDigits": 2 } } } }, "textSettings": { "style": "bignumber" } }, "conditionalVisibility": { "parameterName": "selectedTab", "comparison": "isEqualTo", "value": "rg" }, "customWidth": "15", "name": "query - Orphan Resource Groups Count" }, { "type": 3, "content": { "version": "KqlItem/1.0", "query": "ResourceContainers\r\n | where type == \"microsoft.resources/subscriptions/resourcegroups\"\r\n | extend rgAndSub = strcat(resourceGroup, \"--\", subscriptionId)\r\n | join kind=leftouter (\r\n Resources\r\n | extend rgAndSub = strcat(resourceGroup, \"--\", subscriptionId)\r\n | summarize count() by rgAndSub\r\n ) on rgAndSub\r\n | where isnull(count_)\r\n| summarize count(type) by location", "size": 4, "title": "Count by Location", "queryType": 1, "resourceType": "microsoft.resourcegraph/resources", "crossComponentResources": [ "{Subscriptions}" ], "visualization": "piechart", "gridSettings": { "formatters": [ { "columnMatch": "$gen_group", "formatter": 13, "formatOptions": { "linkTarget": "Resource", "showIcon": true } }, { "columnMatch": "id", "formatter": 5 }, { "columnMatch": "subscriptionId", "formatter": 5 }, { "columnMatch": "Details", "formatter": 7, "formatOptions": { "linkTarget": "CellDetails", "linkLabel": "🔍 View Details", "linkIsContextBlade": true } } ], "rowLimit": 1000, "hierarchySettings": { "treeType": 1, "groupBy": [ "subscriptionId" ], "expandTopLevel": true, "finalBy": "id" } }, "sortBy": [], "tileSettings": { "titleContent": { "columnMatch": "DiskType", "formatter": 1 }, "leftContent": { "columnMatch": "Count", "formatter": 12, "formatOptions": { "palette": "auto" }, "numberFormat": { "unit": 17, "options": { "maximumSignificantDigits": 3, "maximumFractionDigits": 2 } } }, "showBorder": true }, "graphSettings": { "type": 0, "topContent": { "columnMatch": "vmSize", "formatter": 1 }, "centerContent": { "columnMatch": "Count", "formatter": 1, "numberFormat": { "unit": 17, "options": { "maximumSignificantDigits": 3, "maximumFractionDigits": 2 } } } }, "chartSettings": { "showMetrics": false, "showLegend": true }, "mapSettings": { "locInfo": "LatLong", "sizeSettings": "Count", "sizeAggregation": "Sum", "legendMetric": "Count", "legendAggregation": "Sum", "itemColorSettings": { "type": "heatmap", "colorAggregation": "Sum", "nodeColorField": "Count", "heatmapPalette": "greenRed" } } }, "conditionalVisibility": { "parameterName": "selectedTab", "comparison": "isEqualTo", "value": "rg" }, "customWidth": "30", "name": "query - Orphan Resource Groups by Location" }, { "type": 3, "content": { "version": "KqlItem/1.0", "query": "ResourceContainers\r\n | where type == \"microsoft.resources/subscriptions/resourcegroups\"\r\n | extend rgAndSub = strcat(resourceGroup, \"--\", subscriptionId)\r\n | join kind=leftouter (\r\n Resources\r\n | extend rgAndSub = strcat(resourceGroup, \"--\", subscriptionId)\r\n | summarize count() by rgAndSub\r\n ) on rgAndSub\r\n | where isnull(count_)\r\n | extend Details = pack_all()\r\n | project subscriptionId, Resource=id, location, tags ,Details", "size": 3, "title": "Orphan Resource Groups", "noDataMessage": "No oprhan Resource Groups found", "showExportToExcel": true, "queryType": 1, "resourceType": "microsoft.resourcegraph/resources", "crossComponentResources": [ "{Subscriptions}" ], "gridSettings": { "formatters": [ { "columnMatch": "$gen_group", "formatter": 13, "formatOptions": { "linkTarget": "Resource", "linkIsContextBlade": true, "showIcon": true } }, { "columnMatch": "subscriptionId", "formatter": 5 }, { "columnMatch": "Resource", "formatter": 5 }, { "columnMatch": "Details", "formatter": 7, "formatOptions": { "linkTarget": "CellDetails", "linkLabel": "🔍 View Details", "linkIsContextBlade": true } } ], "rowLimit": 1000, "filter": true, "hierarchySettings": { "treeType": 1, "groupBy": [ "subscriptionId" ], "expandTopLevel": true, "finalBy": "Resource" }, "labelSettings": [ { "columnId": "subscriptionId", "label": "Subscription" }, { "columnId": "Resource", "label": "Resource Group Name" }, { "columnId": "location", "label": "Location" }, { "columnId": "tags", "label": "Tags" } ] }, "sortBy": [], "tileSettings": { "titleContent": { "columnMatch": "vmSize", "formatter": 1, "formatOptions": { "showIcon": true } }, "leftContent": { "columnMatch": "Count", "formatter": 12, "formatOptions": { "palette": "auto", "showIcon": true }, "numberFormat": { "unit": 17, "options": { "maximumSignificantDigits": 3, "maximumFractionDigits": 2 } } }, "showBorder": true }, "graphSettings": { "type": 0, "topContent": { "columnMatch": "vmSize", "formatter": 1 }, "centerContent": { "columnMatch": "Count", "formatter": 1, "numberFormat": { "unit": 17, "options": { "maximumSignificantDigits": 3, "maximumFractionDigits": 2 } } } } }, "conditionalVisibility": { "parameterName": "selectedTab", "comparison": "isEqualTo", "value": "rg" }, "name": "query - Orphan Resource Groups" }, { "type": 1, "content": { "json": "## NoShow - End Resource Groups\r\n\r\n## NoShow - Begin Network Security Groups" }, "conditionalVisibility": { "parameterName": "noshow", "comparison": "isEqualTo", "value": "noshow" }, "name": "text - NoShow Begin NSGs" }, { "type": 1, "content": { "json": "# Orphan Network Security Groups" }, "conditionalVisibility": { "parameterName": "selectedTab", "comparison": "isEqualTo", "value": "nsg" }, "name": "text - Title Orphan Network Security Groups" }, { "type": 3, "content": { "version": "KqlItem/1.0", "query": "Resources\r\n| where type == \"microsoft.network/networksecuritygroups\" and isnull(properties.networkInterfaces) and isnull(properties.subnets)\r\n| summarize count(type)", "size": 4, "title": "Total", "queryType": 1, "resourceType": "microsoft.resourcegraph/resources", "crossComponentResources": [ "{Subscriptions}" ], "visualization": "tiles", "gridSettings": { "formatters": [ { "columnMatch": "$gen_group", "formatter": 13, "formatOptions": { "linkTarget": "Resource", "showIcon": true } }, { "columnMatch": "id", "formatter": 5 }, { "columnMatch": "subscriptionId", "formatter": 5 }, { "columnMatch": "Details", "formatter": 7, "formatOptions": { "linkTarget": "CellDetails", "linkLabel": "🔍 View Details", "linkIsContextBlade": true } } ], "rowLimit": 1000, "hierarchySettings": { "treeType": 1, "groupBy": [ "subscriptionId" ], "expandTopLevel": true, "finalBy": "id" } }, "sortBy": [], "tileSettings": { "titleContent": { "columnMatch": "count_type", "formatter": 12, "formatOptions": { "palette": "auto" } }, "showBorder": true, "sortOrderField": 2, "size": "auto" }, "graphSettings": { "type": 0, "topContent": { "columnMatch": "vmSize", "formatter": 1 }, "centerContent": { "columnMatch": "Count", "formatter": 1, "numberFormat": { "unit": 17, "options": { "maximumSignificantDigits": 3, "maximumFractionDigits": 2 } } } }, "textSettings": { "style": "bignumber" } }, "conditionalVisibility": { "parameterName": "selectedTab", "comparison": "isEqualTo", "value": "nsg" }, "customWidth": "15", "name": "query - Orphan NSGs Count" }, { "type": 3, "content": { "version": "KqlItem/1.0", "query": "Resources\r\n| where type == \"microsoft.network/networksecuritygroups\" and isnull(properties.networkInterfaces) and isnull(properties.subnets)\r\n| summarize count(type) by location", "size": 4, "title": "Count by Location", "queryType": 1, "resourceType": "microsoft.resourcegraph/resources", "crossComponentResources": [ "{Subscriptions}" ], "visualization": "piechart", "gridSettings": { "formatters": [ { "columnMatch": "$gen_group", "formatter": 13, "formatOptions": { "linkTarget": "Resource", "showIcon": true } }, { "columnMatch": "id", "formatter": 5 }, { "columnMatch": "subscriptionId", "formatter": 5 }, { "columnMatch": "Details", "formatter": 7, "formatOptions": { "linkTarget": "CellDetails", "linkLabel": "🔍 View Details", "linkIsContextBlade": true } } ], "rowLimit": 1000, "hierarchySettings": { "treeType": 1, "groupBy": [ "subscriptionId" ], "expandTopLevel": true, "finalBy": "id" } }, "sortBy": [], "tileSettings": { "titleContent": { "columnMatch": "DiskType", "formatter": 1 }, "leftContent": { "columnMatch": "Count", "formatter": 12, "formatOptions": { "palette": "auto" }, "numberFormat": { "unit": 17, "options": { "maximumSignificantDigits": 3, "maximumFractionDigits": 2 } } }, "showBorder": true }, "graphSettings": { "type": 0, "topContent": { "columnMatch": "vmSize", "formatter": 1 }, "centerContent": { "columnMatch": "Count", "formatter": 1, "numberFormat": { "unit": 17, "options": { "maximumSignificantDigits": 3, "maximumFractionDigits": 2 } } } }, "chartSettings": { "showMetrics": false, "showLegend": true }, "mapSettings": { "locInfo": "LatLong", "sizeSettings": "Count", "sizeAggregation": "Sum", "legendMetric": "Count", "legendAggregation": "Sum", "itemColorSettings": { "type": "heatmap", "colorAggregation": "Sum", "nodeColorField": "Count", "heatmapPalette": "greenRed" } } }, "conditionalVisibility": { "parameterName": "selectedTab", "comparison": "isEqualTo", "value": "nsg" }, "customWidth": "30", "name": "query - Orphan NSGs by Location" }, { "type": 3, "content": { "version": "KqlItem/1.0", "query": "Resources\r\n| where type == \"microsoft.network/networksecuritygroups\" and isnull(properties.networkInterfaces) and isnull(properties.subnets)\r\n| extend Details = pack_all()\r\n| project subscriptionId, Resource=id, resourceGroup, location, tags, Details", "size": 3, "title": "Orphan Network Security Group", "noDataMessage": "No oprhan NSGs found", "showExportToExcel": true, "queryType": 1, "resourceType": "microsoft.resourcegraph/resources", "crossComponentResources": [ "{Subscriptions}" ], "gridSettings": { "formatters": [ { "columnMatch": "$gen_group", "formatter": 13, "formatOptions": { "linkTarget": "Resource", "linkIsContextBlade": true, "showIcon": true } }, { "columnMatch": "subscriptionId", "formatter": 5 }, { "columnMatch": "Resource", "formatter": 5 }, { "columnMatch": "Details", "formatter": 7, "formatOptions": { "linkTarget": "CellDetails", "linkLabel": "🔍 View Details", "linkIsContextBlade": true } } ], "rowLimit": 1000, "filter": true, "hierarchySettings": { "treeType": 1, "groupBy": [ "subscriptionId" ], "expandTopLevel": true, "finalBy": "Resource" }, "labelSettings": [ { "columnId": "subscriptionId", "label": "Subscription" }, { "columnId": "Resource", "label": "Resource Name" }, { "columnId": "resourceGroup", "label": "Resource Group" }, { "columnId": "location", "label": "Location" } ] }, "sortBy": [], "tileSettings": { "titleContent": { "columnMatch": "vmSize", "formatter": 1, "formatOptions": { "showIcon": true } }, "leftContent": { "columnMatch": "Count", "formatter": 12, "formatOptions": { "palette": "auto", "showIcon": true }, "numberFormat": { "unit": 17, "options": { "maximumSignificantDigits": 3, "maximumFractionDigits": 2 } } }, "showBorder": true }, "graphSettings": { "type": 0, "topContent": { "columnMatch": "vmSize", "formatter": 1 }, "centerContent": { "columnMatch": "Count", "formatter": 1, "numberFormat": { "unit": 17, "options": { "maximumSignificantDigits": 3, "maximumFractionDigits": 2 } } } } }, "conditionalVisibility": { "parameterName": "selectedTab", "comparison": "isEqualTo", "value": "nsg" }, "name": "query - Orphan NSGs" }, { "type": 1, "content": { "json": "## NoShow - End Network Security Groups\r\n\r\n## NoShow - Begin Availability Set" }, "conditionalVisibility": { "parameterName": "noshow", "comparison": "isEqualTo", "value": "noshow" }, "name": "text - NoShow Begin Availability Set" }, { "type": 1, "content": { "json": "# Orphan Availability Set" }, "conditionalVisibility": { "parameterName": "selectedTab", "comparison": "isEqualTo", "value": "avset" }, "name": "text - Title Orphan Availability Set" }, { "type": 3, "content": { "version": "KqlItem/1.0", "query": "Resources\r\n| where type =~ 'Microsoft.Compute/availabilitySets'\r\n| where properties.virtualMachines == \"[]\"\r\n| summarize count(type)\r\n", "size": 4, "title": "Total", "queryType": 1, "resourceType": "microsoft.resourcegraph/resources", "crossComponentResources": [ "{Subscriptions}" ], "visualization": "tiles", "gridSettings": { "formatters": [ { "columnMatch": "$gen_group", "formatter": 13, "formatOptions": { "linkTarget": "Resource", "showIcon": true } }, { "columnMatch": "id", "formatter": 5 }, { "columnMatch": "subscriptionId", "formatter": 5 }, { "columnMatch": "Details", "formatter": 7, "formatOptions": { "linkTarget": "CellDetails", "linkLabel": "🔍 View Details", "linkIsContextBlade": true } } ], "rowLimit": 1000, "hierarchySettings": { "treeType": 1, "groupBy": [ "subscriptionId" ], "expandTopLevel": true, "finalBy": "id" } }, "sortBy": [], "tileSettings": { "titleContent": { "columnMatch": "count_type", "formatter": 12, "formatOptions": { "palette": "auto" } }, "showBorder": true, "sortOrderField": 2, "size": "auto" }, "graphSettings": { "type": 0, "topContent": { "columnMatch": "vmSize", "formatter": 1 }, "centerContent": { "columnMatch": "Count", "formatter": 1, "numberFormat": { "unit": 17, "options": { "maximumSignificantDigits": 3, "maximumFractionDigits": 2 } } } }, "textSettings": { "style": "bignumber" } }, "conditionalVisibility": { "parameterName": "selectedTab", "comparison": "isEqualTo", "value": "avset" }, "customWidth": "15", "name": "query - Orphan Availability Set Count" }, { "type": 3, "content": { "version": "KqlItem/1.0", "query": "Resources\r\n| where type =~ 'Microsoft.Compute/availabilitySets'\r\n| where properties.virtualMachines == \"[]\"\r\n| summarize count(type) by location", "size": 4, "title": "Count by Location", "queryType": 1, "resourceType": "microsoft.resourcegraph/resources", "crossComponentResources": [ "{Subscriptions}" ], "visualization": "piechart", "gridSettings": { "formatters": [ { "columnMatch": "$gen_group", "formatter": 13, "formatOptions": { "linkTarget": "Resource", "showIcon": true } }, { "columnMatch": "id", "formatter": 5 }, { "columnMatch": "subscriptionId", "formatter": 5 }, { "columnMatch": "Details", "formatter": 7, "formatOptions": { "linkTarget": "CellDetails", "linkLabel": "🔍 View Details", "linkIsContextBlade": true } } ], "rowLimit": 1000, "hierarchySettings": { "treeType": 1, "groupBy": [ "subscriptionId" ], "expandTopLevel": true, "finalBy": "id" } }, "sortBy": [], "tileSettings": { "titleContent": { "columnMatch": "DiskType", "formatter": 1 }, "leftContent": { "columnMatch": "Count", "formatter": 12, "formatOptions": { "palette": "auto" }, "numberFormat": { "unit": 17, "options": { "maximumSignificantDigits": 3, "maximumFractionDigits": 2 } } }, "showBorder": true }, "graphSettings": { "type": 0, "topContent": { "columnMatch": "vmSize", "formatter": 1 }, "centerContent": { "columnMatch": "Count", "formatter": 1, "numberFormat": { "unit": 17, "options": { "maximumSignificantDigits": 3, "maximumFractionDigits": 2 } } } }, "chartSettings": { "showMetrics": false, "showLegend": true }, "mapSettings": { "locInfo": "LatLong", "sizeSettings": "Count", "sizeAggregation": "Sum", "legendMetric": "Count", "legendAggregation": "Sum", "itemColorSettings": { "type": "heatmap", "colorAggregation": "Sum", "nodeColorField": "Count", "heatmapPalette": "greenRed" } } }, "conditionalVisibility": { "parameterName": "selectedTab", "comparison": "isEqualTo", "value": "avset" }, "customWidth": "30", "name": "query - Orphan Availability Set by Location" }, { "type": 3, "content": { "version": "KqlItem/1.0", "query": "Resources\r\n| where type =~ 'Microsoft.Compute/availabilitySets'\r\n| where properties.virtualMachines == \"[]\"\r\n| extend Details = pack_all()\r\n| project subscriptionId, Resource=id, resourceGroup, location, tags, Details", "size": 3, "title": "Orphan Availability Set", "noDataMessage": "No oprhan Availability Set found", "showExportToExcel": true, "queryType": 1, "resourceType": "microsoft.resourcegraph/resources", "crossComponentResources": [ "{Subscriptions}" ], "gridSettings": { "formatters": [ { "columnMatch": "$gen_group", "formatter": 13, "formatOptions": { "linkTarget": "Resource", "linkIsContextBlade": true, "showIcon": true } }, { "columnMatch": "subscriptionId", "formatter": 5 }, { "columnMatch": "Resource", "formatter": 5 }, { "columnMatch": "Details", "formatter": 7, "formatOptions": { "linkTarget": "CellDetails", "linkLabel": "🔍 View Details", "linkIsContextBlade": true } } ], "rowLimit": 1000, "filter": true, "hierarchySettings": { "treeType": 1, "groupBy": [ "subscriptionId" ], "expandTopLevel": true, "finalBy": "Resource" }, "labelSettings": [ { "columnId": "subscriptionId", "label": "Subscription" }, { "columnId": "Resource", "label": "Resource Name" }, { "columnId": "resourceGroup", "label": "Resource Group" }, { "columnId": "location", "label": "Location" }, { "columnId": "tags", "label": "Tags" } ] }, "sortBy": [], "tileSettings": { "titleContent": { "columnMatch": "vmSize", "formatter": 1, "formatOptions": { "showIcon": true } }, "leftContent": { "columnMatch": "Count", "formatter": 12, "formatOptions": { "palette": "auto", "showIcon": true }, "numberFormat": { "unit": 17, "options": { "maximumSignificantDigits": 3, "maximumFractionDigits": 2 } } }, "showBorder": true }, "graphSettings": { "type": 0, "topContent": { "columnMatch": "vmSize", "formatter": 1 }, "centerContent": { "columnMatch": "Count", "formatter": 1, "numberFormat": { "unit": 17, "options": { "maximumSignificantDigits": 3, "maximumFractionDigits": 2 } } } } }, "conditionalVisibility": { "parameterName": "selectedTab", "comparison": "isEqualTo", "value": "avset" }, "name": "query - Orphan Availability Set" }, { "type": 1, "content": { "json": "## NoShow - End Availability Set\r\n\r\n## NoShow - Begin Route Tables" }, "conditionalVisibility": { "parameterName": "noshow", "comparison": "isEqualTo", "value": "noshow" }, "name": "text - NoShow Route Tables" }, { "type": 1, "content": { "json": "# Orphan Route Tables" }, "conditionalVisibility": { "parameterName": "selectedTab", "comparison": "isEqualTo", "value": "rt" }, "name": "text - Title Orphan Route Tables" }, { "type": 3, "content": { "version": "KqlItem/1.0", "query": "resources\r\n| where type == \"microsoft.network/routetables\"\r\n| where isnull(properties.subnets)\r\n| summarize count(type)\r\n", "size": 4, "title": "Total", "queryType": 1, "resourceType": "microsoft.resourcegraph/resources", "crossComponentResources": [ "{Subscriptions}" ], "visualization": "tiles", "gridSettings": { "formatters": [ { "columnMatch": "$gen_group", "formatter": 13, "formatOptions": { "linkTarget": "Resource", "showIcon": true } }, { "columnMatch": "id", "formatter": 5 }, { "columnMatch": "subscriptionId", "formatter": 5 }, { "columnMatch": "Details", "formatter": 7, "formatOptions": { "linkTarget": "CellDetails", "linkLabel": "🔍 View Details", "linkIsContextBlade": true } } ], "rowLimit": 1000, "hierarchySettings": { "treeType": 1, "groupBy": [ "subscriptionId" ], "expandTopLevel": true, "finalBy": "id" } }, "sortBy": [], "tileSettings": { "titleContent": { "columnMatch": "count_type", "formatter": 12, "formatOptions": { "palette": "auto" } }, "showBorder": true, "sortOrderField": 2, "size": "auto" }, "graphSettings": { "type": 0, "topContent": { "columnMatch": "vmSize", "formatter": 1 }, "centerContent": { "columnMatch": "Count", "formatter": 1, "numberFormat": { "unit": 17, "options": { "maximumSignificantDigits": 3, "maximumFractionDigits": 2 } } } }, "textSettings": { "style": "bignumber" } }, "conditionalVisibility": { "parameterName": "selectedTab", "comparison": "isEqualTo", "value": "rt" }, "customWidth": "15", "name": "query - Orphan Route Tables Count" }, { "type": 3, "content": { "version": "KqlItem/1.0", "query": "resources\r\n| where type == \"microsoft.network/routetables\"\r\n| where isnull(properties.subnets)\r\n| summarize count(type) by location", "size": 4, "title": "Count by Location", "queryType": 1, "resourceType": "microsoft.resourcegraph/resources", "crossComponentResources": [ "{Subscriptions}" ], "visualization": "piechart", "gridSettings": { "formatters": [ { "columnMatch": "$gen_group", "formatter": 13, "formatOptions": { "linkTarget": "Resource", "showIcon": true } }, { "columnMatch": "id", "formatter": 5 }, { "columnMatch": "subscriptionId", "formatter": 5 }, { "columnMatch": "Details", "formatter": 7, "formatOptions": { "linkTarget": "CellDetails", "linkLabel": "🔍 View Details", "linkIsContextBlade": true } } ], "rowLimit": 1000, "hierarchySettings": { "treeType": 1, "groupBy": [ "subscriptionId" ], "expandTopLevel": true, "finalBy": "id" }, "labelSettings": [ { "columnId": "subscriptionId", "label": "Subscription" }, { "columnId": "Resource", "label": "Resource Name" }, { "columnId": "resourceGroup", "label": "Resource Group" }, { "columnId": "location", "label": "Location" }, { "columnId": "tags", "label": "Tags" } ] }, "sortBy": [], "tileSettings": { "titleContent": { "columnMatch": "DiskType", "formatter": 1 }, "leftContent": { "columnMatch": "Count", "formatter": 12, "formatOptions": { "palette": "auto" }, "numberFormat": { "unit": 17, "options": { "maximumSignificantDigits": 3, "maximumFractionDigits": 2 } } }, "showBorder": true }, "graphSettings": { "type": 0, "topContent": { "columnMatch": "vmSize", "formatter": 1 }, "centerContent": { "columnMatch": "Count", "formatter": 1, "numberFormat": { "unit": 17, "options": { "maximumSignificantDigits": 3, "maximumFractionDigits": 2 } } } }, "chartSettings": { "showMetrics": false, "showLegend": true }, "mapSettings": { "locInfo": "LatLong", "sizeSettings": "Count", "sizeAggregation": "Sum", "legendMetric": "Count", "legendAggregation": "Sum", "itemColorSettings": { "type": "heatmap", "colorAggregation": "Sum", "nodeColorField": "Count", "heatmapPalette": "greenRed" } } }, "conditionalVisibility": { "parameterName": "selectedTab", "comparison": "isEqualTo", "value": "rt" }, "customWidth": "30", "name": "query - Orphan Route Tables by Location" }, { "type": 3, "content": { "version": "KqlItem/1.0", "query": "resources\r\n| where type == \"microsoft.network/routetables\"\r\n| where isnull(properties.subnets)\r\n| extend Details = pack_all()\r\n| project subscriptionId, Resource=id, resourceGroup, location, tags, Details", "size": 3, "title": "Orphan Route Tables", "noDataMessage": "No oprhan Route Tables found", "showExportToExcel": true, "queryType": 1, "resourceType": "microsoft.resourcegraph/resources", "crossComponentResources": [ "{Subscriptions}" ], "gridSettings": { "formatters": [ { "columnMatch": "$gen_group", "formatter": 13, "formatOptions": { "linkTarget": "Resource", "linkIsContextBlade": true, "showIcon": true } }, { "columnMatch": "subscriptionId", "formatter": 5 }, { "columnMatch": "Resource", "formatter": 5 }, { "columnMatch": "Details", "formatter": 7, "formatOptions": { "linkTarget": "CellDetails", "linkLabel": "🔍 View Details", "linkIsContextBlade": true } } ], "rowLimit": 1000, "filter": true, "hierarchySettings": { "treeType": 1, "groupBy": [ "subscriptionId" ], "expandTopLevel": true, "finalBy": "Resource" }, "labelSettings": [ { "columnId": "subscriptionId", "label": "Subscription" }, { "columnId": "Resource", "label": "Resource Name" }, { "columnId": "resourceGroup", "label": "Resource Group" }, { "columnId": "location", "label": "Location" }, { "columnId": "tags", "label": "Tags" } ] }, "sortBy": [], "tileSettings": { "titleContent": { "columnMatch": "vmSize", "formatter": 1, "formatOptions": { "showIcon": true } }, "leftContent": { "columnMatch": "Count", "formatter": 12, "formatOptions": { "palette": "auto", "showIcon": true }, "numberFormat": { "unit": 17, "options": { "maximumSignificantDigits": 3, "maximumFractionDigits": 2 } } }, "showBorder": true }, "graphSettings": { "type": 0, "topContent": { "columnMatch": "vmSize", "formatter": 1 }, "centerContent": { "columnMatch": "Count", "formatter": 1, "numberFormat": { "unit": 17, "options": { "maximumSignificantDigits": 3, "maximumFractionDigits": 2 } } } } }, "conditionalVisibility": { "parameterName": "selectedTab", "comparison": "isEqualTo", "value": "rt" }, "name": "query - Orphan Route Tables" }, { "type": 1, "content": { "json": "## NoShow - End Route Tables\r\n\r\n## NoShow - Begin Load Balancers" }, "conditionalVisibility": { "parameterName": "noshow", "comparison": "isEqualTo", "value": "noshow" }, "name": "text - NoShow begin Load Balancers" }, { "type": 1, "content": { "json": "# Orphan Load Balancers" }, "conditionalVisibility": { "parameterName": "selectedTab", "comparison": "isEqualTo", "value": "lb" }, "name": "text - Title Orphan Load Balancers" }, { "type": 3, "content": { "version": "KqlItem/1.0", "query": "resources\r\n| where type == \"microsoft.network/loadbalancers\"\r\n| where properties.backendAddressPools == \"[]\"\r\n| summarize count(type)", "size": 4, "title": "Total", "queryType": 1, "resourceType": "microsoft.resourcegraph/resources", "crossComponentResources": [ "{Subscriptions}" ], "visualization": "tiles", "gridSettings": { "formatters": [ { "columnMatch": "$gen_group", "formatter": 13, "formatOptions": { "linkTarget": "Resource", "showIcon": true } }, { "columnMatch": "id", "formatter": 5 }, { "columnMatch": "subscriptionId", "formatter": 5 }, { "columnMatch": "Details", "formatter": 7, "formatOptions": { "linkTarget": "CellDetails", "linkLabel": "🔍 View Details", "linkIsContextBlade": true } } ], "rowLimit": 1000, "hierarchySettings": { "treeType": 1, "groupBy": [ "subscriptionId" ], "expandTopLevel": true, "finalBy": "id" } }, "sortBy": [], "tileSettings": { "titleContent": { "columnMatch": "count_type", "formatter": 12, "formatOptions": { "palette": "auto" } }, "showBorder": true, "sortOrderField": 2, "size": "auto" }, "graphSettings": { "type": 0, "topContent": { "columnMatch": "vmSize", "formatter": 1 }, "centerContent": { "columnMatch": "Count", "formatter": 1, "numberFormat": { "unit": 17, "options": { "maximumSignificantDigits": 3, "maximumFractionDigits": 2 } } } }, "textSettings": { "style": "bignumber" } }, "conditionalVisibility": { "parameterName": "selectedTab", "comparison": "isEqualTo", "value": "lb" }, "customWidth": "15", "name": "query - Orphan Load Balancers count" }, { "type": 3, "content": { "version": "KqlItem/1.0", "query": "resources\r\n| where type == \"microsoft.network/loadbalancers\"\r\n| where properties.backendAddressPools == \"[]\"\r\n| summarize count(type) by tostring(sku.name)", "size": 4, "title": "Count by Type", "queryType": 1, "resourceType": "microsoft.resourcegraph/resources", "crossComponentResources": [ "{Subscriptions}" ], "visualization": "piechart", "gridSettings": { "formatters": [ { "columnMatch": "$gen_group", "formatter": 13, "formatOptions": { "linkTarget": "Resource", "showIcon": true } }, { "columnMatch": "id", "formatter": 5 }, { "columnMatch": "subscriptionId", "formatter": 5 }, { "columnMatch": "Details", "formatter": 7, "formatOptions": { "linkTarget": "CellDetails", "linkLabel": "🔍 View Details", "linkIsContextBlade": true } } ], "rowLimit": 1000, "hierarchySettings": { "treeType": 1, "groupBy": [ "subscriptionId" ], "expandTopLevel": true, "finalBy": "id" }, "labelSettings": [ { "columnId": "subscriptionId", "label": "Subscription" }, { "columnId": "Resource", "label": "Resource Name" }, { "columnId": "resourceGroup", "label": "Resource Group" }, { "columnId": "location", "label": "Location" }, { "columnId": "tags", "label": "Tags" } ] }, "sortBy": [], "tileSettings": { "titleContent": { "columnMatch": "DiskType", "formatter": 1 }, "leftContent": { "columnMatch": "Count", "formatter": 12, "formatOptions": { "palette": "auto" }, "numberFormat": { "unit": 17, "options": { "maximumSignificantDigits": 3, "maximumFractionDigits": 2 } } }, "showBorder": true }, "graphSettings": { "type": 0, "topContent": { "columnMatch": "vmSize", "formatter": 1 }, "centerContent": { "columnMatch": "Count", "formatter": 1, "numberFormat": { "unit": 17, "options": { "maximumSignificantDigits": 3, "maximumFractionDigits": 2 } } } }, "chartSettings": { "showMetrics": false, "showLegend": true }, "mapSettings": { "locInfo": "LatLong", "sizeSettings": "Count", "sizeAggregation": "Sum", "legendMetric": "Count", "legendAggregation": "Sum", "itemColorSettings": { "type": "heatmap", "colorAggregation": "Sum", "nodeColorField": "Count", "heatmapPalette": "greenRed" } } }, "conditionalVisibility": { "parameterName": "selectedTab", "comparison": "isEqualTo", "value": "lb" }, "customWidth": "30", "name": "query - Orphan Load Balancers by Type" }, { "type": 3, "content": { "version": "KqlItem/1.0", "query": "resources\r\n| where type == \"microsoft.network/loadbalancers\"\r\n| where properties.backendAddressPools == \"[]\"\r\n| summarize count(type) by location", "size": 4, "title": "Count by Location", "queryType": 1, "resourceType": "microsoft.resourcegraph/resources", "crossComponentResources": [ "{Subscriptions}" ], "visualization": "piechart", "gridSettings": { "formatters": [ { "columnMatch": "$gen_group", "formatter": 13, "formatOptions": { "linkTarget": "Resource", "showIcon": true } }, { "columnMatch": "id", "formatter": 5 }, { "columnMatch": "subscriptionId", "formatter": 5 }, { "columnMatch": "Details", "formatter": 7, "formatOptions": { "linkTarget": "CellDetails", "linkLabel": "🔍 View Details", "linkIsContextBlade": true } } ], "rowLimit": 1000, "hierarchySettings": { "treeType": 1, "groupBy": [ "subscriptionId" ], "expandTopLevel": true, "finalBy": "id" }, "labelSettings": [ { "columnId": "subscriptionId", "label": "Subscription" }, { "columnId": "Resource", "label": "Resource Name" }, { "columnId": "resourceGroup", "label": "Resource Group" }, { "columnId": "location", "label": "Location" }, { "columnId": "tags", "label": "Tags" } ] }, "sortBy": [], "tileSettings": { "titleContent": { "columnMatch": "DiskType", "formatter": 1 }, "leftContent": { "columnMatch": "Count", "formatter": 12, "formatOptions": { "palette": "auto" }, "numberFormat": { "unit": 17, "options": { "maximumSignificantDigits": 3, "maximumFractionDigits": 2 } } }, "showBorder": true }, "graphSettings": { "type": 0, "topContent": { "columnMatch": "vmSize", "formatter": 1 }, "centerContent": { "columnMatch": "Count", "formatter": 1, "numberFormat": { "unit": 17, "options": { "maximumSignificantDigits": 3, "maximumFractionDigits": 2 } } } }, "chartSettings": { "showMetrics": false, "showLegend": true }, "mapSettings": { "locInfo": "LatLong", "sizeSettings": "Count", "sizeAggregation": "Sum", "legendMetric": "Count", "legendAggregation": "Sum", "itemColorSettings": { "type": "heatmap", "colorAggregation": "Sum", "nodeColorField": "Count", "heatmapPalette": "greenRed" } } }, "conditionalVisibility": { "parameterName": "selectedTab", "comparison": "isEqualTo", "value": "lb" }, "customWidth": "30", "name": "query - Orphan Load Balancers by Location" }, { "type": 3, "content": { "version": "KqlItem/1.0", "query": "resources\r\n| where type == \"microsoft.network/loadbalancers\"\r\n| where properties.backendAddressPools == \"[]\"\r\n| extend Details = pack_all()\r\n| project subscriptionId, Resource=id, resourceGroup, location, tostring(sku.name), tags, Details", "size": 3, "title": "Orphan Load Balances", "noDataMessage": "No oprhan Load Balances found", "showExportToExcel": true, "queryType": 1, "resourceType": "microsoft.resourcegraph/resources", "crossComponentResources": [ "{Subscriptions}" ], "gridSettings": { "formatters": [ { "columnMatch": "$gen_group", "formatter": 13, "formatOptions": { "linkTarget": "Resource", "linkIsContextBlade": true, "showIcon": true } }, { "columnMatch": "subscriptionId", "formatter": 5 }, { "columnMatch": "Resource", "formatter": 5 }, { "columnMatch": "Details", "formatter": 7, "formatOptions": { "linkTarget": "CellDetails", "linkLabel": "🔍 View Details", "linkIsContextBlade": true } } ], "rowLimit": 1000, "filter": true, "hierarchySettings": { "treeType": 1, "groupBy": [ "subscriptionId" ], "expandTopLevel": true, "finalBy": "Resource" }, "labelSettings": [ { "columnId": "subscriptionId", "label": "Subscription" }, { "columnId": "Resource", "label": "Resource Name" }, { "columnId": "resourceGroup", "label": "Resource Group" }, { "columnId": "location", "label": "Location" }, { "columnId": "sku_name", "label": "Type" }, { "columnId": "tags", "label": "Tags" } ] }, "sortBy": [], "tileSettings": { "titleContent": { "columnMatch": "vmSize", "formatter": 1, "formatOptions": { "showIcon": true } }, "leftContent": { "columnMatch": "Count", "formatter": 12, "formatOptions": { "palette": "auto", "showIcon": true }, "numberFormat": { "unit": 17, "options": { "maximumSignificantDigits": 3, "maximumFractionDigits": 2 } } }, "showBorder": true }, "graphSettings": { "type": 0, "topContent": { "columnMatch": "vmSize", "formatter": 1 }, "centerContent": { "columnMatch": "Count", "formatter": 1, "numberFormat": { "unit": 17, "options": { "maximumSignificantDigits": 3, "maximumFractionDigits": 2 } } } } }, "conditionalVisibility": { "parameterName": "selectedTab", "comparison": "isEqualTo", "value": "lb" }, "name": "query - Orphan Load Balancers" }, { "type": 1, "content": { "json": "## NoShow - End Load Balancers\r\n\r\n## NoShow - Begin App Service Plans" }, "conditionalVisibility": { "parameterName": "noshow", "comparison": "isEqualTo", "value": "noshow" }, "name": "text - NoShow begin App Service Plans" }, { "type": 1, "content": { "json": "# Orphan App Service Plans" }, "conditionalVisibility": { "parameterName": "selectedTab", "comparison": "isEqualTo", "value": "appsp" }, "name": "text - Title Orphan App Service Plans" }, { "type": 3, "content": { "version": "KqlItem/1.0", "query": "resources\r\n| where type =~ \"microsoft.web/serverfarms\"\r\n| where properties.numberOfSites == 0\r\n| summarize count(type)", "size": 4, "title": "Total", "queryType": 1, "resourceType": "microsoft.resourcegraph/resources", "crossComponentResources": [ "{Subscriptions}" ], "visualization": "tiles", "gridSettings": { "formatters": [ { "columnMatch": "$gen_group", "formatter": 13, "formatOptions": { "linkTarget": "Resource", "showIcon": true } }, { "columnMatch": "id", "formatter": 5 }, { "columnMatch": "subscriptionId", "formatter": 5 }, { "columnMatch": "Details", "formatter": 7, "formatOptions": { "linkTarget": "CellDetails", "linkLabel": "🔍 View Details", "linkIsContextBlade": true } } ], "rowLimit": 1000, "hierarchySettings": { "treeType": 1, "groupBy": [ "subscriptionId" ], "expandTopLevel": true, "finalBy": "id" } }, "sortBy": [], "tileSettings": { "titleContent": { "columnMatch": "count_type", "formatter": 12, "formatOptions": { "palette": "auto" } }, "showBorder": true, "sortOrderField": 2, "size": "auto" }, "graphSettings": { "type": 0, "topContent": { "columnMatch": "vmSize", "formatter": 1 }, "centerContent": { "columnMatch": "Count", "formatter": 1, "numberFormat": { "unit": 17, "options": { "maximumSignificantDigits": 3, "maximumFractionDigits": 2 } } } }, "textSettings": { "style": "bignumber" } }, "conditionalVisibility": { "parameterName": "selectedTab", "comparison": "isEqualTo", "value": "appsp" }, "customWidth": "15", "name": "query - Orphan App Service Plan count" }, { "type": 3, "content": { "version": "KqlItem/1.0", "query": "resources\r\n| where type =~ \"microsoft.web/serverfarms\"\r\n| where properties.numberOfSites == 0\r\n| summarize count(type) by tostring(sku.name)", "size": 4, "title": "Count by sku", "queryType": 1, "resourceType": "microsoft.resourcegraph/resources", "crossComponentResources": [ "{Subscriptions}" ], "visualization": "piechart", "gridSettings": { "formatters": [ { "columnMatch": "$gen_group", "formatter": 13, "formatOptions": { "linkTarget": "Resource", "showIcon": true } }, { "columnMatch": "id", "formatter": 5 }, { "columnMatch": "subscriptionId", "formatter": 5 }, { "columnMatch": "Details", "formatter": 7, "formatOptions": { "linkTarget": "CellDetails", "linkLabel": "🔍 View Details", "linkIsContextBlade": true } } ], "rowLimit": 1000, "hierarchySettings": { "treeType": 1, "groupBy": [ "subscriptionId" ], "expandTopLevel": true, "finalBy": "id" }, "labelSettings": [ { "columnId": "subscriptionId", "label": "Subscription" }, { "columnId": "Resource", "label": "Resource Name" }, { "columnId": "resourceGroup", "label": "Resource Group" }, { "columnId": "location", "label": "Location" }, { "columnId": "tags", "label": "Tags" } ] }, "sortBy": [], "tileSettings": { "titleContent": { "columnMatch": "DiskType", "formatter": 1 }, "leftContent": { "columnMatch": "Count", "formatter": 12, "formatOptions": { "palette": "auto" }, "numberFormat": { "unit": 17, "options": { "maximumSignificantDigits": 3, "maximumFractionDigits": 2 } } }, "showBorder": true }, "graphSettings": { "type": 0, "topContent": { "columnMatch": "vmSize", "formatter": 1 }, "centerContent": { "columnMatch": "Count", "formatter": 1, "numberFormat": { "unit": 17, "options": { "maximumSignificantDigits": 3, "maximumFractionDigits": 2 } } } }, "chartSettings": { "showMetrics": false, "showLegend": true }, "mapSettings": { "locInfo": "LatLong", "sizeSettings": "Count", "sizeAggregation": "Sum", "legendMetric": "Count", "legendAggregation": "Sum", "itemColorSettings": { "type": "heatmap", "colorAggregation": "Sum", "nodeColorField": "Count", "heatmapPalette": "greenRed" } } }, "conditionalVisibility": { "parameterName": "selectedTab", "comparison": "isEqualTo", "value": "appsp" }, "customWidth": "25", "name": "query - Orphan App Service Plan by sku" }, { "type": 3, "content": { "version": "KqlItem/1.0", "query": "resources\r\n| where type =~ \"microsoft.web/serverfarms\"\r\n| where properties.numberOfSites == 0\r\n| summarize count(type) by tostring(sku.tier)", "size": 4, "title": "Count by Tier", "queryType": 1, "resourceType": "microsoft.resourcegraph/resources", "crossComponentResources": [ "{Subscriptions}" ], "visualization": "piechart", "gridSettings": { "formatters": [ { "columnMatch": "$gen_group", "formatter": 13, "formatOptions": { "linkTarget": "Resource", "showIcon": true } }, { "columnMatch": "id", "formatter": 5 }, { "columnMatch": "subscriptionId", "formatter": 5 }, { "columnMatch": "Details", "formatter": 7, "formatOptions": { "linkTarget": "CellDetails", "linkLabel": "🔍 View Details", "linkIsContextBlade": true } } ], "rowLimit": 1000, "hierarchySettings": { "treeType": 1, "groupBy": [ "subscriptionId" ], "expandTopLevel": true, "finalBy": "id" }, "labelSettings": [ { "columnId": "subscriptionId", "label": "Subscription" }, { "columnId": "Resource", "label": "Resource Name" }, { "columnId": "resourceGroup", "label": "Resource Group" }, { "columnId": "location", "label": "Location" }, { "columnId": "tags", "label": "Tags" } ] }, "sortBy": [], "tileSettings": { "titleContent": { "columnMatch": "DiskType", "formatter": 1 }, "leftContent": { "columnMatch": "Count", "formatter": 12, "formatOptions": { "palette": "auto" }, "numberFormat": { "unit": 17, "options": { "maximumSignificantDigits": 3, "maximumFractionDigits": 2 } } }, "showBorder": true }, "graphSettings": { "type": 0, "topContent": { "columnMatch": "vmSize", "formatter": 1 }, "centerContent": { "columnMatch": "Count", "formatter": 1, "numberFormat": { "unit": 17, "options": { "maximumSignificantDigits": 3, "maximumFractionDigits": 2 } } } }, "chartSettings": { "showMetrics": false, "showLegend": true }, "mapSettings": { "locInfo": "LatLong", "sizeSettings": "Count", "sizeAggregation": "Sum", "legendMetric": "Count", "legendAggregation": "Sum", "itemColorSettings": { "type": "heatmap", "colorAggregation": "Sum", "nodeColorField": "Count", "heatmapPalette": "greenRed" } } }, "conditionalVisibility": { "parameterName": "selectedTab", "comparison": "isEqualTo", "value": "appsp" }, "customWidth": "25", "name": "query - Orphan App Service Plan by Tier" }, { "type": 3, "content": { "version": "KqlItem/1.0", "query": "resources\r\n| where type =~ \"microsoft.web/serverfarms\"\r\n| where properties.numberOfSites == 0\r\n| summarize count(type) by location", "size": 4, "title": "Count by Location", "queryType": 1, "resourceType": "microsoft.resourcegraph/resources", "crossComponentResources": [ "{Subscriptions}" ], "visualization": "piechart", "gridSettings": { "formatters": [ { "columnMatch": "$gen_group", "formatter": 13, "formatOptions": { "linkTarget": "Resource", "showIcon": true } }, { "columnMatch": "id", "formatter": 5 }, { "columnMatch": "subscriptionId", "formatter": 5 }, { "columnMatch": "Details", "formatter": 7, "formatOptions": { "linkTarget": "CellDetails", "linkLabel": "🔍 View Details", "linkIsContextBlade": true } } ], "rowLimit": 1000, "hierarchySettings": { "treeType": 1, "groupBy": [ "subscriptionId" ], "expandTopLevel": true, "finalBy": "id" }, "labelSettings": [ { "columnId": "subscriptionId", "label": "Subscription" }, { "columnId": "Resource", "label": "Resource Name" }, { "columnId": "resourceGroup", "label": "Resource Group" }, { "columnId": "location", "label": "Location" }, { "columnId": "tags", "label": "Tags" } ] }, "sortBy": [], "tileSettings": { "titleContent": { "columnMatch": "DiskType", "formatter": 1 }, "leftContent": { "columnMatch": "Count", "formatter": 12, "formatOptions": { "palette": "auto" }, "numberFormat": { "unit": 17, "options": { "maximumSignificantDigits": 3, "maximumFractionDigits": 2 } } }, "showBorder": true }, "graphSettings": { "type": 0, "topContent": { "columnMatch": "vmSize", "formatter": 1 }, "centerContent": { "columnMatch": "Count", "formatter": 1, "numberFormat": { "unit": 17, "options": { "maximumSignificantDigits": 3, "maximumFractionDigits": 2 } } } }, "chartSettings": { "showMetrics": false, "showLegend": true }, "mapSettings": { "locInfo": "LatLong", "sizeSettings": "Count", "sizeAggregation": "Sum", "legendMetric": "Count", "legendAggregation": "Sum", "itemColorSettings": { "type": "heatmap", "colorAggregation": "Sum", "nodeColorField": "Count", "heatmapPalette": "greenRed" } } }, "conditionalVisibility": { "parameterName": "selectedTab", "comparison": "isEqualTo", "value": "appsp" }, "customWidth": "30", "name": "query - Orphan App Service Plan by Location" }, { "type": 3, "content": { "version": "KqlItem/1.0", "query": "resources\r\n| where type =~ \"microsoft.web/serverfarms\"\r\n| where properties.numberOfSites == 0\r\n| extend Details = pack_all()\r\n| project Resource=id, resourceGroup, location, subscriptionId, Sku=sku.name, Tier=sku.tier, tags ,Details", "size": 3, "title": "Orphan Load Balances", "noDataMessage": "No oprhan App Service Plans found", "showExportToExcel": true, "queryType": 1, "resourceType": "microsoft.resourcegraph/resources", "crossComponentResources": [ "{Subscriptions}" ], "gridSettings": { "formatters": [ { "columnMatch": "$gen_group", "formatter": 13, "formatOptions": { "linkTarget": "Resource", "linkIsContextBlade": true, "showIcon": true } }, { "columnMatch": "subscriptionId", "formatter": 5 }, { "columnMatch": "Resource", "formatter": 5 }, { "columnMatch": "Details", "formatter": 7, "formatOptions": { "linkTarget": "CellDetails", "linkLabel": "🔍 View Details", "linkIsContextBlade": true } } ], "rowLimit": 1000, "filter": true, "hierarchySettings": { "treeType": 1, "groupBy": [ "subscriptionId" ], "expandTopLevel": true, "finalBy": "Resource" }, "labelSettings": [ { "columnId": "resourceGroup", "label": "Resource Group" }, { "columnId": "location", "label": "Location" }, { "columnId": "subscriptionId", "label": "Subscription" }, { "columnId": "tags", "label": "Tags" } ] }, "sortBy": [], "tileSettings": { "titleContent": { "columnMatch": "vmSize", "formatter": 1, "formatOptions": { "showIcon": true } }, "leftContent": { "columnMatch": "Count", "formatter": 12, "formatOptions": { "palette": "auto", "showIcon": true }, "numberFormat": { "unit": 17, "options": { "maximumSignificantDigits": 3, "maximumFractionDigits": 2 } } }, "showBorder": true }, "graphSettings": { "type": 0, "topContent": { "columnMatch": "vmSize", "formatter": 1 }, "centerContent": { "columnMatch": "Count", "formatter": 1, "numberFormat": { "unit": 17, "options": { "maximumSignificantDigits": 3, "maximumFractionDigits": 2 } } } } }, "conditionalVisibility": { "parameterName": "selectedTab", "comparison": "isEqualTo", "value": "appsp" }, "name": "query - Orphan App Service Plans" }, { "type": 1, "content": { "json": "## NoShow - End App Service Plans\r\n\r\n## NoShow - Begin Front Door WAF Policy" }, "conditionalVisibility": { "parameterName": "noshow", "comparison": "isEqualTo", "value": "noshow" }, "name": "text - NoShow begin Front Door WAF Policy" }, { "type": 1, "content": { "json": "# Orphan Front Door WAF Policy" }, "conditionalVisibility": { "parameterName": "selectedTab", "comparison": "isEqualTo", "value": "fdwafpolicy" }, "name": "text - Title Orphan Front Door WAF Policy" }, { "type": 3, "content": { "version": "KqlItem/1.0", "query": "resources\r\n| where type == \"microsoft.network/frontdoorwebapplicationfirewallpolicies\"\r\n| where properties.frontendEndpointLinks== \"[]\" and properties.securityPolicyLinks == \"[]\"\r\n| summarize count(type)", "size": 4, "title": "Total", "queryType": 1, "resourceType": "microsoft.resourcegraph/resources", "crossComponentResources": [ "{Subscriptions}" ], "visualization": "tiles", "gridSettings": { "formatters": [ { "columnMatch": "$gen_group", "formatter": 13, "formatOptions": { "linkTarget": "Resource", "showIcon": true } }, { "columnMatch": "id", "formatter": 5 }, { "columnMatch": "subscriptionId", "formatter": 5 }, { "columnMatch": "Details", "formatter": 7, "formatOptions": { "linkTarget": "CellDetails", "linkLabel": "🔍 View Details", "linkIsContextBlade": true } } ], "rowLimit": 1000, "hierarchySettings": { "treeType": 1, "groupBy": [ "subscriptionId" ], "expandTopLevel": true, "finalBy": "id" } }, "sortBy": [], "tileSettings": { "titleContent": { "columnMatch": "count_type", "formatter": 12, "formatOptions": { "palette": "auto" } }, "showBorder": true, "sortOrderField": 2, "size": "auto" }, "graphSettings": { "type": 0, "topContent": { "columnMatch": "vmSize", "formatter": 1 }, "centerContent": { "columnMatch": "Count", "formatter": 1, "numberFormat": { "unit": 17, "options": { "maximumSignificantDigits": 3, "maximumFractionDigits": 2 } } } }, "textSettings": { "style": "bignumber" } }, "conditionalVisibility": { "parameterName": "selectedTab", "comparison": "isEqualTo", "value": "fdwafpolicy" }, "customWidth": "15", "name": "query - Orphan Front Door WAF Policy count" }, { "type": 3, "content": { "version": "KqlItem/1.0", "query": "resources\r\n| where type == \"microsoft.network/frontdoorwebapplicationfirewallpolicies\"\r\n| where properties.frontendEndpointLinks== \"[]\" and properties.securityPolicyLinks == \"[]\"\r\n| summarize count(type) by tostring(sku.name)", "size": 4, "title": "Count by sku", "queryType": 1, "resourceType": "microsoft.resourcegraph/resources", "crossComponentResources": [ "{Subscriptions}" ], "visualization": "piechart", "gridSettings": { "formatters": [ { "columnMatch": "$gen_group", "formatter": 13, "formatOptions": { "linkTarget": "Resource", "showIcon": true } }, { "columnMatch": "id", "formatter": 5 }, { "columnMatch": "subscriptionId", "formatter": 5 }, { "columnMatch": "Details", "formatter": 7, "formatOptions": { "linkTarget": "CellDetails", "linkLabel": "🔍 View Details", "linkIsContextBlade": true } } ], "rowLimit": 1000, "hierarchySettings": { "treeType": 1, "groupBy": [ "subscriptionId" ], "expandTopLevel": true, "finalBy": "id" }, "labelSettings": [ { "columnId": "subscriptionId", "label": "Subscription" }, { "columnId": "Resource", "label": "Resource Name" }, { "columnId": "resourceGroup", "label": "Resource Group" }, { "columnId": "location", "label": "Location" }, { "columnId": "tags", "label": "Tags" } ] }, "sortBy": [], "tileSettings": { "titleContent": { "columnMatch": "DiskType", "formatter": 1 }, "leftContent": { "columnMatch": "Count", "formatter": 12, "formatOptions": { "palette": "auto" }, "numberFormat": { "unit": 17, "options": { "maximumSignificantDigits": 3, "maximumFractionDigits": 2 } } }, "showBorder": true }, "graphSettings": { "type": 0, "topContent": { "columnMatch": "vmSize", "formatter": 1 }, "centerContent": { "columnMatch": "Count", "formatter": 1, "numberFormat": { "unit": 17, "options": { "maximumSignificantDigits": 3, "maximumFractionDigits": 2 } } } }, "chartSettings": { "showMetrics": false, "showLegend": true }, "mapSettings": { "locInfo": "LatLong", "sizeSettings": "Count", "sizeAggregation": "Sum", "legendMetric": "Count", "legendAggregation": "Sum", "itemColorSettings": { "type": "heatmap", "colorAggregation": "Sum", "nodeColorField": "Count", "heatmapPalette": "greenRed" } } }, "conditionalVisibility": { "parameterName": "selectedTab", "comparison": "isEqualTo", "value": "fdwafpolicy" }, "customWidth": "25", "name": "query - Orphan Front Door WAF Policy by sku" }, { "type": 3, "content": { "version": "KqlItem/1.0", "query": "resources\r\n| where type == \"microsoft.network/frontdoorwebapplicationfirewallpolicies\"\r\n| where properties.frontendEndpointLinks== \"[]\" and properties.securityPolicyLinks == \"[]\"\r\n| extend Details = pack_all()\r\n| project Resource=id, resourceGroup, location, subscriptionId, Sku=sku.name, tags, Details", "size": 3, "title": "Orphan Front Door WAF Policy", "noDataMessage": "No oprhan Front Door WAF Policy found", "showExportToExcel": true, "queryType": 1, "resourceType": "microsoft.resourcegraph/resources", "crossComponentResources": [ "{Subscriptions}" ], "gridSettings": { "formatters": [ { "columnMatch": "$gen_group", "formatter": 13, "formatOptions": { "linkTarget": "Resource", "linkIsContextBlade": true, "showIcon": true } }, { "columnMatch": "subscriptionId", "formatter": 5 }, { "columnMatch": "Resource", "formatter": 5 }, { "columnMatch": "Details", "formatter": 7, "formatOptions": { "linkTarget": "CellDetails", "linkLabel": "🔍 View Details", "linkIsContextBlade": true } } ], "rowLimit": 1000, "filter": true, "hierarchySettings": { "treeType": 1, "groupBy": [ "subscriptionId" ], "expandTopLevel": true, "finalBy": "Resource" }, "labelSettings": [ { "columnId": "resourceGroup", "label": "Resource Group" }, { "columnId": "location", "label": "Location" }, { "columnId": "subscriptionId", "label": "Subscription" }, { "columnId": "tags", "label": "Tags" } ] }, "sortBy": [], "tileSettings": { "titleContent": { "columnMatch": "vmSize", "formatter": 1, "formatOptions": { "showIcon": true } }, "leftContent": { "columnMatch": "Count", "formatter": 12, "formatOptions": { "palette": "auto", "showIcon": true }, "numberFormat": { "unit": 17, "options": { "maximumSignificantDigits": 3, "maximumFractionDigits": 2 } } }, "showBorder": true }, "graphSettings": { "type": 0, "topContent": { "columnMatch": "vmSize", "formatter": 1 }, "centerContent": { "columnMatch": "Count", "formatter": 1, "numberFormat": { "unit": 17, "options": { "maximumSignificantDigits": 3, "maximumFractionDigits": 2 } } } } }, "conditionalVisibility": { "parameterName": "selectedTab", "comparison": "isEqualTo", "value": "fdwafpolicy" }, "name": "query - Orphan Front Door WAF Policy" }, { "type": 1, "content": { "json": "## NoShow - End Front Door WAF Policy\r\n\r\n## NoShow - Begin Traffic Manager Profiles" }, "conditionalVisibility": { "parameterName": "noshow", "comparison": "isEqualTo", "value": "noshow" }, "name": "text - NoShow begin Traffic Manager Profiles" }, { "type": 1, "content": { "json": "# Orphan Traffic Manager Profiles" }, "conditionalVisibility": { "parameterName": "selectedTab", "comparison": "isEqualTo", "value": "tmprofile" }, "name": "text - Title Orphan Traffic Manager Profiles" }, { "type": 3, "content": { "version": "KqlItem/1.0", "query": "resources\r\n| where type == \"microsoft.network/trafficmanagerprofiles\"\r\n| where properties.endpoints == \"[]\"\r\n| summarize count(type)", "size": 4, "title": "Total", "queryType": 1, "resourceType": "microsoft.resourcegraph/resources", "crossComponentResources": [ "{Subscriptions}" ], "visualization": "tiles", "gridSettings": { "formatters": [ { "columnMatch": "$gen_group", "formatter": 13, "formatOptions": { "linkTarget": "Resource", "showIcon": true } }, { "columnMatch": "id", "formatter": 5 }, { "columnMatch": "subscriptionId", "formatter": 5 }, { "columnMatch": "Details", "formatter": 7, "formatOptions": { "linkTarget": "CellDetails", "linkLabel": "🔍 View Details", "linkIsContextBlade": true } } ], "rowLimit": 1000, "hierarchySettings": { "treeType": 1, "groupBy": [ "subscriptionId" ], "expandTopLevel": true, "finalBy": "id" } }, "sortBy": [], "tileSettings": { "titleContent": { "columnMatch": "count_type", "formatter": 12, "formatOptions": { "palette": "auto" } }, "showBorder": true, "sortOrderField": 2, "size": "auto" }, "graphSettings": { "type": 0, "topContent": { "columnMatch": "vmSize", "formatter": 1 }, "centerContent": { "columnMatch": "Count", "formatter": 1, "numberFormat": { "unit": 17, "options": { "maximumSignificantDigits": 3, "maximumFractionDigits": 2 } } } }, "textSettings": { "style": "bignumber" } }, "conditionalVisibility": { "parameterName": "selectedTab", "comparison": "isEqualTo", "value": "tmprofile" }, "customWidth": "15", "name": "query - Orphan Traffic Manager Profiles" }, { "type": 3, "content": { "version": "KqlItem/1.0", "query": "resources\r\n| where type == \"microsoft.network/trafficmanagerprofiles\"\r\n| where properties.endpoints == \"[]\"\r\n| extend Details = pack_all()\r\n| project Resource=id, resourceGroup, location, subscriptionId, tags, Details", "size": 3, "title": "Orphan Traffic Manager Profiles", "noDataMessage": "No oprhan Traffic Manager Profiles found", "showExportToExcel": true, "queryType": 1, "resourceType": "microsoft.resourcegraph/resources", "crossComponentResources": [ "{Subscriptions}" ], "gridSettings": { "formatters": [ { "columnMatch": "$gen_group", "formatter": 13, "formatOptions": { "linkTarget": "Resource", "linkIsContextBlade": true, "showIcon": true } }, { "columnMatch": "subscriptionId", "formatter": 5 }, { "columnMatch": "Resource", "formatter": 5 }, { "columnMatch": "Details", "formatter": 7, "formatOptions": { "linkTarget": "CellDetails", "linkLabel": "🔍 View Details", "linkIsContextBlade": true } } ], "rowLimit": 1000, "filter": true, "hierarchySettings": { "treeType": 1, "groupBy": [ "subscriptionId" ], "expandTopLevel": true, "finalBy": "Resource" }, "labelSettings": [ { "columnId": "resourceGroup", "label": "Resource Group" }, { "columnId": "location", "label": "Location" }, { "columnId": "subscriptionId", "label": "Subscription" }, { "columnId": "tags", "label": "Tags" } ] }, "sortBy": [], "tileSettings": { "titleContent": { "columnMatch": "vmSize", "formatter": 1, "formatOptions": { "showIcon": true } }, "leftContent": { "columnMatch": "Count", "formatter": 12, "formatOptions": { "palette": "auto", "showIcon": true }, "numberFormat": { "unit": 17, "options": { "maximumSignificantDigits": 3, "maximumFractionDigits": 2 } } }, "showBorder": true }, "graphSettings": { "type": 0, "topContent": { "columnMatch": "vmSize", "formatter": 1 }, "centerContent": { "columnMatch": "Count", "formatter": 1, "numberFormat": { "unit": 17, "options": { "maximumSignificantDigits": 3, "maximumFractionDigits": 2 } } } } }, "conditionalVisibility": { "parameterName": "selectedTab", "comparison": "isEqualTo", "value": "tmprofile" }, "name": "query - Orphan Traffic Manager Profiles" } ], "fallbackResourceIds": [ "Azure Monitor" ], "$schema": "https://github.com/Microsoft/Application-Insights-Workbooks/blob/master/schema/workbook.json" }