|
| 1 | +{ |
| 2 | + "version": "Notebook/1.0", |
| 3 | + "items": [ |
| 4 | + { |
| 5 | + "type": 1, |
| 6 | + "content": { |
| 7 | + "json": "# Azure Arc SQL Databases" |
| 8 | + }, |
| 9 | + "name": "text - 3" |
| 10 | + }, |
| 11 | + { |
| 12 | + "type": 3, |
| 13 | + "content": { |
| 14 | + "version": "KqlItem/1.0", |
| 15 | + "query": "resources\r\n| where type == \"microsoft.azurearcdata/sqlserverinstances/databases\"\r\n| extend compatibilityLevel = tostring(properties['compatibilityLevel'])\r\n| summarize Databases = count(compatibilityLevel) by compatibilityLevel", |
| 16 | + "size": 3, |
| 17 | + "title": "Count of Databases by Compatibility Level", |
| 18 | + "queryType": 1, |
| 19 | + "resourceType": "microsoft.resources/tenants", |
| 20 | + "crossComponentResources": [ |
| 21 | + "value::tenant" |
| 22 | + ], |
| 23 | + "visualization": "piechart", |
| 24 | + "chartSettings": { |
| 25 | + "showMetrics": false, |
| 26 | + "showLegend": true |
| 27 | + } |
| 28 | + }, |
| 29 | + "customWidth": "33", |
| 30 | + "name": "Count of Databases by Compatibility Level" |
| 31 | + }, |
| 32 | + { |
| 33 | + "type": 3, |
| 34 | + "content": { |
| 35 | + "version": "KqlItem/1.0", |
| 36 | + "query": "resources\r\n| where type == \"microsoft.azurearcdata/sqlserverinstances/databases\"\r\n| extend recoveryMode = tostring(properties.recoveryMode)\r\n| summarize Databases = count(recoveryMode) by recoveryMode", |
| 37 | + "size": 3, |
| 38 | + "title": "Count of Databases by Recovery Model", |
| 39 | + "queryType": 1, |
| 40 | + "resourceType": "microsoft.resources/tenants", |
| 41 | + "crossComponentResources": [ |
| 42 | + "value::tenant" |
| 43 | + ], |
| 44 | + "visualization": "piechart", |
| 45 | + "chartSettings": { |
| 46 | + "showMetrics": false, |
| 47 | + "showLegend": true |
| 48 | + } |
| 49 | + }, |
| 50 | + "customWidth": "33", |
| 51 | + "name": "Query 2" |
| 52 | + }, |
| 53 | + { |
| 54 | + "type": 3, |
| 55 | + "content": { |
| 56 | + "version": "KqlItem/1.0", |
| 57 | + "query": "resources\r\n| where type == \"microsoft.azurearcdata/sqlserverinstances/databases\"\r\n| extend lastFullBackup = iff(isnull(properties['backupInformation']['lastFullBackup']),'False','True')\r\n| summarize Databases = count(lastFullBackup) by lastFullBackup", |
| 58 | + "size": 3, |
| 59 | + "title": "Count of Databases by Full Backup", |
| 60 | + "queryType": 1, |
| 61 | + "resourceType": "microsoft.resources/tenants", |
| 62 | + "crossComponentResources": [ |
| 63 | + "value::tenant" |
| 64 | + ], |
| 65 | + "visualization": "piechart", |
| 66 | + "chartSettings": { |
| 67 | + "showMetrics": false, |
| 68 | + "showLegend": true, |
| 69 | + "seriesLabelSettings": [ |
| 70 | + { |
| 71 | + "seriesName": "True", |
| 72 | + "color": "green" |
| 73 | + }, |
| 74 | + { |
| 75 | + "seriesName": "False", |
| 76 | + "color": "redBright" |
| 77 | + } |
| 78 | + ] |
| 79 | + } |
| 80 | + }, |
| 81 | + "customWidth": "33", |
| 82 | + "name": "Query 2 - Copy" |
| 83 | + }, |
| 84 | + { |
| 85 | + "type": 3, |
| 86 | + "content": { |
| 87 | + "version": "KqlItem/1.0", |
| 88 | + "query": "resources\r\n| where type == \"microsoft.azurearcdata/sqlserverinstances/databases\"\r\n| extend compatibilityLevel = tostring(properties['compatibilityLevel'])\r\n| extend lastFullBackup = properties['backupInformation']['lastFullBackup']\r\n| extend lastLogBackup = properties['backupInformation']['lastLogBackup']\r\n| extend Instance = split(['id'],'/Databases')[0]\r\n| project Instance, Database = id ,lastFullBackup = format_datetime(todatetime(lastFullBackup), \"yyyy-MM-dd HH:mm:ss\"),lastLogBackup = format_datetime(todatetime(lastLogBackup), \"yyyy-MM-dd HH:mm:ss\"),compatibilityLevel,recoveryMode = properties.recoveryMode", |
| 89 | + "size": 3, |
| 90 | + "title": "Databases Backup State", |
| 91 | + "queryType": 1, |
| 92 | + "resourceType": "microsoft.resources/tenants", |
| 93 | + "crossComponentResources": [ |
| 94 | + "value::tenant" |
| 95 | + ], |
| 96 | + "gridSettings": { |
| 97 | + "formatters": [ |
| 98 | + { |
| 99 | + "columnMatch": "Instance", |
| 100 | + "formatter": 13, |
| 101 | + "formatOptions": { |
| 102 | + "linkTarget": "Resource", |
| 103 | + "showIcon": true |
| 104 | + } |
| 105 | + }, |
| 106 | + { |
| 107 | + "columnMatch": "Database", |
| 108 | + "formatter": 0, |
| 109 | + "formatOptions": { |
| 110 | + "customColumnWidthSetting": "56.714ch" |
| 111 | + } |
| 112 | + } |
| 113 | + ], |
| 114 | + "rowLimit": 1000, |
| 115 | + "filter": true |
| 116 | + }, |
| 117 | + "chartSettings": { |
| 118 | + "showMetrics": false, |
| 119 | + "showLegend": true |
| 120 | + } |
| 121 | + }, |
| 122 | + "name": "Query2" |
| 123 | + } |
| 124 | + ], |
| 125 | + "fallbackResourceIds": [ |
| 126 | + "azure monitor" |
| 127 | + ], |
| 128 | + "$schema": "https://github.com/Microsoft/Application-Insights-Workbooks/blob/master/schema/workbook.json" |
| 129 | +} |
0 commit comments