Skip to content

Instantly share code, notes, and snippets.

@kongou-ae
Created April 12, 2023 01:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kongou-ae/03410ef609dc2c653377640d667ded3a to your computer and use it in GitHub Desktop.
Save kongou-ae/03410ef609dc2c653377640d667ded3a to your computer and use it in GitHub Desktop.
{
"version": "Notebook/1.0",
"items": [
{
"type": 1,
"content": {
"json": "# Dashboard for checking DCR and DCE which attaches to VM\r\n\r\nClick the VM which you want to check DCR and DCE in the following table\r\n"
},
"name": "title"
},
{
"type": 3,
"content": {
"version": "KqlItem/1.0",
"query": "resources\r\n| where type == \"microsoft.hybridcompute/machines\" or type == \"microsoft.compute/virtualmachines\"\r\n| project id, name ,resourceGroup, location\r\n| sort by name asc",
"size": 1,
"exportFieldName": "id",
"exportParameterName": "id",
"queryType": 1,
"resourceType": "microsoft.resourcegraph/resources",
"crossComponentResources": [
"value::all"
]
},
"name": "VM list",
"styleSettings": {
"margin": "0px 0px 50px 0px"
}
},
{
"type": 12,
"content": {
"version": "NotebookGroup/1.0",
"groupType": "editable",
"items": [
{
"type": 3,
"content": {
"version": "KqlItem/1.0",
"query": "{\"version\":\"ARMEndpoint/1.0\",\"data\":null,\"headers\":[],\"method\":\"GET\",\"path\":\"{id}/providers/Microsoft.Insights/dataCollectionRuleAssociations?api-version=2021-09-01-preview\",\"urlParams\":[],\"batchDisabled\":false,\"transformers\":[{\"type\":\"jsonpath\",\"settings\":{\"tablePath\":\"$.value[*].properties.dataCollectionRuleId\",\"columns\":[]}}]}",
"size": 4,
"title": "Data Collection Endpoint",
"noDataMessage": "There are no DCR attaches to this VM",
"queryType": 12,
"sortBy": []
},
"customWidth": "50",
"name": "dcr"
},
{
"type": 3,
"content": {
"version": "KqlItem/1.0",
"query": "{\"version\":\"ARMEndpoint/1.0\",\"data\":null,\"headers\":[],\"method\":\"GET\",\"path\":\"{id}/providers/Microsoft.Insights/dataCollectionRuleAssociations?api-version=2021-09-01-preview\",\"urlParams\":[],\"batchDisabled\":false,\"transformers\":[{\"type\":\"jsonpath\",\"settings\":{\"tablePath\":\"$.value[*].properties.dataCollectionEndpointId\",\"columns\":[]}}]}",
"size": 4,
"title": "Data Collection Endpoint",
"noDataMessage": "There are no DCE attaches to this VM",
"queryType": 12,
"sortBy": []
},
"customWidth": "50",
"name": "dce",
"styleSettings": {
"maxWidth": "50"
}
}
]
},
"name": "result"
}
],
"fallbackResourceIds": [
"azure monitor"
],
"$schema": "https://github.com/Microsoft/Application-Insights-Workbooks/blob/master/schema/workbook.json"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment