mirror of
https://github.com/Microsoft/sql-server-samples.git
synced 2025-12-08 14:58:54 +00:00
Added ARC SQL Server Dashboard for azure portal
This commit is contained in:
@@ -0,0 +1,505 @@
|
||||
{
|
||||
"properties": {
|
||||
"lenses": {
|
||||
"0": {
|
||||
"order": 0,
|
||||
"parts": {
|
||||
"0": {
|
||||
"position": {
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"colSpan": 3,
|
||||
"rowSpan": 4
|
||||
},
|
||||
"metadata": {
|
||||
"inputs": [
|
||||
{
|
||||
"name": "chartType",
|
||||
"isOptional": true
|
||||
},
|
||||
{
|
||||
"name": "isShared",
|
||||
"isOptional": true
|
||||
},
|
||||
{
|
||||
"name": "queryId",
|
||||
"isOptional": true
|
||||
},
|
||||
{
|
||||
"name": "formatResults",
|
||||
"isOptional": true
|
||||
},
|
||||
{
|
||||
"name": "partTitle",
|
||||
"value": "Query 1",
|
||||
"isOptional": true
|
||||
},
|
||||
{
|
||||
"name": "queryScope",
|
||||
"value": {
|
||||
"scope": 0,
|
||||
"values": []
|
||||
},
|
||||
"isOptional": true
|
||||
},
|
||||
{
|
||||
"name": "query",
|
||||
"value": "// Count of all resources\nresources\n| where type == \"microsoft.azurearcdata/sqlserverinstances\"\n| summarize Servers=count()\n",
|
||||
"isOptional": true
|
||||
}
|
||||
],
|
||||
"type": "Extension/HubsExtension/PartType/ArgQuerySingleValueTile",
|
||||
"settings": {},
|
||||
"partHeader": {
|
||||
"title": "Number of Servers",
|
||||
"subtitle": ""
|
||||
}
|
||||
}
|
||||
},
|
||||
"1": {
|
||||
"position": {
|
||||
"x": 3,
|
||||
"y": 0,
|
||||
"colSpan": 3,
|
||||
"rowSpan": 4
|
||||
},
|
||||
"metadata": {
|
||||
"inputs": [
|
||||
{
|
||||
"name": "chartType",
|
||||
"isOptional": true
|
||||
},
|
||||
{
|
||||
"name": "isShared",
|
||||
"isOptional": true
|
||||
},
|
||||
{
|
||||
"name": "queryId",
|
||||
"isOptional": true
|
||||
},
|
||||
{
|
||||
"name": "formatResults",
|
||||
"isOptional": true
|
||||
},
|
||||
{
|
||||
"name": "partTitle",
|
||||
"value": "Query 1",
|
||||
"isOptional": true
|
||||
},
|
||||
{
|
||||
"name": "query",
|
||||
"value": "// Count of all resources\nresources\n| where type == \"microsoft.azurearcdata/sqlserverinstances/databases\"\n| count ",
|
||||
"isOptional": true
|
||||
},
|
||||
{
|
||||
"name": "queryScope",
|
||||
"value": {
|
||||
"scope": 0,
|
||||
"values": []
|
||||
},
|
||||
"isOptional": true
|
||||
}
|
||||
],
|
||||
"type": "Extension/HubsExtension/PartType/ArgQuerySingleValueTile",
|
||||
"settings": {},
|
||||
"partHeader": {
|
||||
"title": "Number of Databases",
|
||||
"subtitle": ""
|
||||
}
|
||||
}
|
||||
},
|
||||
"2": {
|
||||
"position": {
|
||||
"x": 6,
|
||||
"y": 0,
|
||||
"colSpan": 14,
|
||||
"rowSpan": 4
|
||||
},
|
||||
"metadata": {
|
||||
"inputs": [
|
||||
{
|
||||
"name": "chartType",
|
||||
"isOptional": true
|
||||
},
|
||||
{
|
||||
"name": "isShared",
|
||||
"isOptional": true
|
||||
},
|
||||
{
|
||||
"name": "queryId",
|
||||
"isOptional": true
|
||||
},
|
||||
{
|
||||
"name": "formatResults",
|
||||
"isOptional": true
|
||||
},
|
||||
{
|
||||
"name": "partTitle",
|
||||
"value": "Query 1",
|
||||
"isOptional": true
|
||||
},
|
||||
{
|
||||
"name": "queryScope",
|
||||
"value": {
|
||||
"scope": 0,
|
||||
"values": []
|
||||
},
|
||||
"isOptional": true
|
||||
},
|
||||
{
|
||||
"name": "query",
|
||||
"value": "resources\r\n| where type == \"microsoft.azurearcdata/sqlserverinstances/databases\"\r\n| summarize Dbs=count(),Offline=sum(toint(iif(tostring(properties[\"state\"])!=\"Online\",1,0)))\r\n,SizeMB=sum(toint(iif(tostring(properties[\"sizeMB\"])!=\"\",properties[\"sizeMB\"],0))) by Instances = tostring(split(tostring(id),\"/\")[8])\r\n| order by Offline",
|
||||
"isOptional": true
|
||||
}
|
||||
],
|
||||
"type": "Extension/HubsExtension/PartType/ArgQueryGridTile",
|
||||
"settings": {},
|
||||
"partHeader": {
|
||||
"title": "Dbs per Servers",
|
||||
"subtitle": ""
|
||||
}
|
||||
}
|
||||
},
|
||||
"3": {
|
||||
"position": {
|
||||
"x": 0,
|
||||
"y": 4,
|
||||
"colSpan": 6,
|
||||
"rowSpan": 6
|
||||
},
|
||||
"metadata": {
|
||||
"inputs": [
|
||||
{
|
||||
"name": "isShared",
|
||||
"isOptional": true
|
||||
},
|
||||
{
|
||||
"name": "queryId",
|
||||
"isOptional": true
|
||||
},
|
||||
{
|
||||
"name": "formatResults",
|
||||
"isOptional": true
|
||||
},
|
||||
{
|
||||
"name": "partTitle",
|
||||
"value": "Query 2",
|
||||
"isOptional": true
|
||||
},
|
||||
{
|
||||
"name": "chartType",
|
||||
"value": 1,
|
||||
"isOptional": true
|
||||
},
|
||||
{
|
||||
"name": "queryScope",
|
||||
"value": {
|
||||
"scope": 0,
|
||||
"values": []
|
||||
},
|
||||
"isOptional": true
|
||||
},
|
||||
{
|
||||
"name": "query",
|
||||
"value": "// If distinct count is small (e.g. < 1000)\n// run next query to get count of each value\nresources\n| where ['type'] == \"microsoft.azurearcdata/sqlserverinstances\"\n| summarize Count=count() by tostring(properties['edition'])\n| order by Count desc",
|
||||
"isOptional": true
|
||||
}
|
||||
],
|
||||
"type": "Extension/HubsExtension/PartType/ArgQueryChartTile",
|
||||
"settings": {},
|
||||
"partHeader": {
|
||||
"title": "Servers per SQL Server Editions",
|
||||
"subtitle": ""
|
||||
}
|
||||
}
|
||||
},
|
||||
"4": {
|
||||
"position": {
|
||||
"x": 6,
|
||||
"y": 4,
|
||||
"colSpan": 8,
|
||||
"rowSpan": 6
|
||||
},
|
||||
"metadata": {
|
||||
"inputs": [
|
||||
{
|
||||
"name": "isShared",
|
||||
"isOptional": true
|
||||
},
|
||||
{
|
||||
"name": "queryId",
|
||||
"isOptional": true
|
||||
},
|
||||
{
|
||||
"name": "formatResults",
|
||||
"isOptional": true
|
||||
},
|
||||
{
|
||||
"name": "chartType",
|
||||
"value": 1,
|
||||
"isOptional": true
|
||||
},
|
||||
{
|
||||
"name": "queryScope",
|
||||
"value": {
|
||||
"scope": 0,
|
||||
"values": []
|
||||
},
|
||||
"isOptional": true
|
||||
},
|
||||
{
|
||||
"name": "partTitle",
|
||||
"value": "Query 1",
|
||||
"isOptional": true
|
||||
},
|
||||
{
|
||||
"name": "query",
|
||||
"value": "resources\r\n| where type == \"microsoft.azurearcdata/sqlserverinstances\"\r\n| summarize Count=sum(toint(properties['vCore'])) by tostring(properties['edition'])\r\n| order by Count desc",
|
||||
"isOptional": true
|
||||
}
|
||||
],
|
||||
"type": "Extension/HubsExtension/PartType/ArgQueryChartTile",
|
||||
"settings": {},
|
||||
"partHeader": {
|
||||
"title": "Cores Per Editions",
|
||||
"subtitle": ""
|
||||
}
|
||||
}
|
||||
},
|
||||
"5": {
|
||||
"position": {
|
||||
"x": 14,
|
||||
"y": 4,
|
||||
"colSpan": 6,
|
||||
"rowSpan": 6
|
||||
},
|
||||
"metadata": {
|
||||
"inputs": [
|
||||
{
|
||||
"name": "isShared",
|
||||
"isOptional": true
|
||||
},
|
||||
{
|
||||
"name": "queryId",
|
||||
"isOptional": true
|
||||
},
|
||||
{
|
||||
"name": "formatResults",
|
||||
"isOptional": true
|
||||
},
|
||||
{
|
||||
"name": "partTitle",
|
||||
"value": "Query 2",
|
||||
"isOptional": true
|
||||
},
|
||||
{
|
||||
"name": "chartType",
|
||||
"value": 1,
|
||||
"isOptional": true
|
||||
},
|
||||
{
|
||||
"name": "queryScope",
|
||||
"value": {
|
||||
"scope": 0,
|
||||
"values": []
|
||||
},
|
||||
"isOptional": true
|
||||
},
|
||||
{
|
||||
"name": "query",
|
||||
"value": "// If distinct count is small (e.g. < 1000)\n// run next query to get count of each value\nresources\n| where type == \"microsoft.azurearcdata/sqlserverinstances/databases\"\n|summarize Count=count() by tostring(properties['compatibilityLevel'])\n| order by Count desc",
|
||||
"isOptional": true
|
||||
}
|
||||
],
|
||||
"type": "Extension/HubsExtension/PartType/ArgQueryChartTile",
|
||||
"settings": {},
|
||||
"partHeader": {
|
||||
"title": "Compatibility Mode",
|
||||
"subtitle": ""
|
||||
}
|
||||
}
|
||||
},
|
||||
"6": {
|
||||
"position": {
|
||||
"x": 0,
|
||||
"y": 10,
|
||||
"colSpan": 6,
|
||||
"rowSpan": 6
|
||||
},
|
||||
"metadata": {
|
||||
"inputs": [
|
||||
{
|
||||
"name": "isShared",
|
||||
"isOptional": true
|
||||
},
|
||||
{
|
||||
"name": "queryId",
|
||||
"isOptional": true
|
||||
},
|
||||
{
|
||||
"name": "formatResults",
|
||||
"isOptional": true
|
||||
},
|
||||
{
|
||||
"name": "partTitle",
|
||||
"value": "Query 2",
|
||||
"isOptional": true
|
||||
},
|
||||
{
|
||||
"name": "chartType",
|
||||
"value": 1,
|
||||
"isOptional": true
|
||||
},
|
||||
{
|
||||
"name": "queryScope",
|
||||
"value": {
|
||||
"scope": 0,
|
||||
"values": []
|
||||
},
|
||||
"isOptional": true
|
||||
},
|
||||
{
|
||||
"name": "query",
|
||||
"value": "resources\n| where type == \"microsoft.azurearcdata/sqlserverinstances\"\n| summarize Count=count() by iff(tostring(properties['azureDefenderStatus'])==\"Unknown\", \"Not Protected\",tostring(properties['azureDefenderStatus']))\n| order by Count desc",
|
||||
"isOptional": true
|
||||
}
|
||||
],
|
||||
"type": "Extension/HubsExtension/PartType/ArgQueryChartTile",
|
||||
"settings": {},
|
||||
"partHeader": {
|
||||
"title": "Defender for SQL",
|
||||
"subtitle": ""
|
||||
}
|
||||
}
|
||||
},
|
||||
"7": {
|
||||
"position": {
|
||||
"x": 6,
|
||||
"y": 10,
|
||||
"colSpan": 6,
|
||||
"rowSpan": 6
|
||||
},
|
||||
"metadata": {
|
||||
"inputs": [
|
||||
{
|
||||
"name": "isShared",
|
||||
"isOptional": true
|
||||
},
|
||||
{
|
||||
"name": "queryId",
|
||||
"isOptional": true
|
||||
},
|
||||
{
|
||||
"name": "formatResults",
|
||||
"isOptional": true
|
||||
},
|
||||
{
|
||||
"name": "partTitle",
|
||||
"value": "Query 1",
|
||||
"isOptional": true
|
||||
},
|
||||
{
|
||||
"name": "chartType",
|
||||
"value": 1,
|
||||
"isOptional": true
|
||||
},
|
||||
{
|
||||
"name": "queryScope",
|
||||
"value": {
|
||||
"scope": 0,
|
||||
"values": []
|
||||
},
|
||||
"isOptional": true
|
||||
},
|
||||
{
|
||||
"name": "query",
|
||||
"value": "resources\n| where ['type'] ==\"microsoft.azurearcdata/sqlserverinstances/databases\"\n| summarize Count=count() by Encrypte=iif(tostring(properties['databaseOptions'].isEncrypted)==\"false\",\"No\", \"Yes\")",
|
||||
"isOptional": true
|
||||
}
|
||||
],
|
||||
"type": "Extension/HubsExtension/PartType/ArgQueryChartTile",
|
||||
"settings": {},
|
||||
"partHeader": {
|
||||
"title": "Encrypted",
|
||||
"subtitle": ""
|
||||
}
|
||||
}
|
||||
},
|
||||
"8": {
|
||||
"position": {
|
||||
"x": 12,
|
||||
"y": 10,
|
||||
"colSpan": 8,
|
||||
"rowSpan": 6
|
||||
},
|
||||
"metadata": {
|
||||
"inputs": [
|
||||
{
|
||||
"name": "isShared",
|
||||
"isOptional": true
|
||||
},
|
||||
{
|
||||
"name": "queryId",
|
||||
"isOptional": true
|
||||
},
|
||||
{
|
||||
"name": "formatResults",
|
||||
"isOptional": true
|
||||
},
|
||||
{
|
||||
"name": "partTitle",
|
||||
"value": "Query 1",
|
||||
"isOptional": true
|
||||
},
|
||||
{
|
||||
"name": "query",
|
||||
"value": "resources\n| where type == \"microsoft.azurearcdata/sqlserverinstances\"\n| summarize Count=count() by tostring(properties['version'])",
|
||||
"isOptional": true
|
||||
},
|
||||
{
|
||||
"name": "chartType",
|
||||
"value": 1,
|
||||
"isOptional": true
|
||||
},
|
||||
{
|
||||
"name": "queryScope",
|
||||
"value": {
|
||||
"scope": 0,
|
||||
"values": []
|
||||
},
|
||||
"isOptional": true
|
||||
}
|
||||
],
|
||||
"type": "Extension/HubsExtension/PartType/ArgQueryChartTile",
|
||||
"settings": {},
|
||||
"partHeader": {
|
||||
"title": "SQL Server Versions",
|
||||
"subtitle": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"metadata": {
|
||||
"model": {
|
||||
"timeRange": {
|
||||
"value": {
|
||||
"relative": {
|
||||
"duration": 24,
|
||||
"timeUnit": 1
|
||||
}
|
||||
},
|
||||
"type": "MsPortalFx.Composition.Configuration.ValueTypes.TimeRange"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"name": "SQL Server Instances",
|
||||
"type": "Microsoft.Portal/dashboards",
|
||||
"location": "INSERT LOCATION",
|
||||
"tags": {
|
||||
"hidden-title": "SQL Server Instances"
|
||||
},
|
||||
"apiVersion": "2015-08-01-preview"
|
||||
}
|
||||
Reference in New Issue
Block a user