diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..c9a60014 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "dotnet.defaultSolution": "disable" +} \ No newline at end of file diff --git a/samples/features/azure-arc/dashboard/Arc - Deployment Progress.json b/samples/features/azure-arc/dashboard/Arc - Deployment Progress.json index b3df74aa..a0379530 100644 --- a/samples/features/azure-arc/dashboard/Arc - Deployment Progress.json +++ b/samples/features/azure-arc/dashboard/Arc - Deployment Progress.json @@ -1,10 +1,10 @@ { "properties": { - "lenses": { - "0": { + "lenses": [ + { "order": 0, - "parts": { - "0": { + "parts": [ + { "position": { "x": 0, "y": 0, @@ -25,7 +25,7 @@ } } }, - "1": { + { "position": { "x": 0, "y": 2, @@ -77,7 +77,7 @@ } } }, - "2": { + { "position": { "x": 3, "y": 2, @@ -129,7 +129,7 @@ } } }, - "3": { + { "position": { "x": 7, "y": 2, @@ -181,7 +181,7 @@ } } }, - "4": { + { "position": { "x": 11, "y": 2, @@ -233,7 +233,7 @@ } } }, - "5": { + { "position": { "x": 14, "y": 2, @@ -254,7 +254,7 @@ } } }, - "6": { + { "position": { "x": 0, "y": 4, @@ -302,11 +302,11 @@ "settings": {}, "partHeader": { "title": "Windows Servers", - "subtitle": "Count of Windws Servers registered to Arc" + "subtitle": "Count of Windows Servers registered to Arc" } } }, - "7": { + { "position": { "x": 3, "y": 4, @@ -354,11 +354,11 @@ "settings": {}, "partHeader": { "title": "Windows Servers Core Count", - "subtitle": "Count of Windws Servers Cores registered to Arc" + "subtitle": "Count of Windows Servers Cores registered to Arc" } } }, - "8": { + { "position": { "x": 7, "y": 4, @@ -410,7 +410,7 @@ } } }, - "9": { + { "position": { "x": 11, "y": 4, @@ -462,7 +462,7 @@ } } }, - "10": { + { "position": { "x": 0, "y": 6, @@ -514,7 +514,7 @@ } } }, - "11": { + { "position": { "x": 3, "y": 6, @@ -566,7 +566,7 @@ } } }, - "12": { + { "position": { "x": 7, "y": 6, @@ -618,7 +618,7 @@ } } }, - "13": { + { "position": { "x": 11, "y": 6, @@ -639,7 +639,7 @@ } } }, - "14": { + { "position": { "x": 0, "y": 8, @@ -691,7 +691,7 @@ } } }, - "15": { + { "position": { "x": 3, "y": 8, @@ -739,11 +739,11 @@ "settings": {}, "partHeader": { "title": "Servers with SQL Server Ent/Std Edition", - "subtitle": "Servers with at least one instance of Standard or Enterprisre Edition" + "subtitle": "Servers with at least one instance of Standard or Enterprise Edition" } } }, - "16": { + { "position": { "x": 7, "y": 8, @@ -795,7 +795,7 @@ } } }, - "17": { + { "position": { "x": 11, "y": 8, @@ -816,7 +816,7 @@ } } }, - "18": { + { "position": { "x": 16, "y": 8, @@ -868,7 +868,7 @@ } } }, - "19": { + { "position": { "x": 0, "y": 10, @@ -915,12 +915,12 @@ "type": "Extension/HubsExtension/PartType/ArgQuerySingleValueTile", "settings": {}, "partHeader": { - "title": "Provisioned SQL Server Instasnces", + "title": "Provisioned SQL Server Instances", "subtitle": "Count of SQL Server instances provisioned" } } }, - "20": { + { "position": { "x": 3, "y": 10, @@ -972,7 +972,7 @@ } } }, - "21": { + { "position": { "x": 7, "y": 10, @@ -993,7 +993,7 @@ } } }, - "22": { + { "position": { "x": 0, "y": 12, @@ -1046,7 +1046,7 @@ } } }, - "23": { + { "position": { "x": 13, "y": 12, @@ -1099,7 +1099,7 @@ } } }, - "24": { + { "position": { "x": 0, "y": 18, @@ -1152,7 +1152,7 @@ } } }, - "25": { + { "position": { "x": 0, "y": 24, @@ -1205,7 +1205,7 @@ } } }, - "26": { + { "position": { "x": 0, "y": 31, @@ -1258,7 +1258,7 @@ } } }, - "27": { + { "position": { "x": 9, "y": 31, @@ -1310,7 +1310,7 @@ } } }, - "28": { + { "position": { "x": 0, "y": 38, @@ -1359,11 +1359,11 @@ "settings": {}, "partHeader": { "title": "SQL Server Instances by Version", - "subtitle": "SQL Server instasnces enabled by Azure Arc by SQL Server version" + "subtitle": "SQL Server instances enabled by Azure Arc by SQL Server version" } } }, - "29": { + { "position": { "x": 9, "y": 38, @@ -1416,7 +1416,7 @@ } } }, - "30": { + { "position": { "x": 0, "y": 45, @@ -1468,7 +1468,7 @@ } } }, - "31": { + { "position": { "x": 0, "y": 51, @@ -1520,7 +1520,7 @@ } } }, - "32": { + { "position": { "x": 0, "y": 56, @@ -1572,7 +1572,7 @@ } } }, - "33": { + { "position": { "x": 0, "y": 61, @@ -1624,7 +1624,7 @@ } } }, - "34": { + { "position": { "x": 0, "y": 67, @@ -1678,9 +1678,9 @@ } } } - } + ] } - }, + ], "metadata": { "model": { "timeRange": { @@ -1701,5 +1701,5 @@ "tags": { "hidden-title": "Arc - Deployment Progress" }, - "apiVersion": "2015-08-01-preview" + "apiVersion": "2022-12-01-preview" } \ No newline at end of file diff --git a/samples/features/azure-arc/dashboard/Arc - ESU.json b/samples/features/azure-arc/dashboard/Arc - ESU.json index b42ac4d9..df147305 100644 --- a/samples/features/azure-arc/dashboard/Arc - ESU.json +++ b/samples/features/azure-arc/dashboard/Arc - ESU.json @@ -1,10 +1,10 @@ { "properties": { - "lenses": { - "0": { + "lenses": [ + { "order": 0, - "parts": { - "0": { + "parts": [ + { "position": { "x": 0, "y": 0, @@ -25,7 +25,7 @@ } } }, - "1": { + { "position": { "x": 0, "y": 2, @@ -46,7 +46,7 @@ } } }, - "2": { + { "position": { "x": 6, "y": 2, @@ -67,7 +67,7 @@ } } }, - "3": { + { "position": { "x": 12, "y": 2, @@ -88,7 +88,7 @@ } } }, - "4": { + { "position": { "x": 0, "y": 3, @@ -141,7 +141,7 @@ } } }, - "5": { + { "position": { "x": 6, "y": 3, @@ -194,7 +194,7 @@ } } }, - "6": { + { "position": { "x": 12, "y": 3, @@ -247,7 +247,7 @@ } } }, - "7": { + { "position": { "x": 0, "y": 8, @@ -300,7 +300,7 @@ } } }, - "8": { + { "position": { "x": 6, "y": 8, @@ -353,7 +353,7 @@ } } }, - "9": { + { "position": { "x": 12, "y": 8, @@ -406,7 +406,7 @@ } } }, - "10": { + { "position": { "x": 0, "y": 13, @@ -458,7 +458,7 @@ } } }, - "11": { + { "position": { "x": 12, "y": 13, @@ -511,7 +511,7 @@ } } }, - "12": { + { "position": { "x": 0, "y": 18, @@ -564,7 +564,7 @@ } } }, - "13": { + { "position": { "x": 0, "y": 24, @@ -616,7 +616,7 @@ } } }, - "14": { + { "position": { "x": 12, "y": 24, @@ -669,7 +669,7 @@ } } }, - "15": { + { "position": { "x": 0, "y": 29, @@ -721,7 +721,7 @@ } } }, - "16": { + { "position": { "x": 12, "y": 29, @@ -774,9 +774,9 @@ } } } - } + ] } - }, + ], "metadata": { "model": { "timeRange": { @@ -797,5 +797,5 @@ "tags": { "hidden-title": "Arc - ESU" }, - "apiVersion": "2015-08-01-preview" + "apiVersion": "2022-12-01-preview" } \ No newline at end of file diff --git a/samples/features/azure-arc/dashboard/Arc - Estate Profile.json b/samples/features/azure-arc/dashboard/Arc - Estate Profile.json index b6df9548..91d888f0 100644 --- a/samples/features/azure-arc/dashboard/Arc - Estate Profile.json +++ b/samples/features/azure-arc/dashboard/Arc - Estate Profile.json @@ -1,10 +1,10 @@ { "properties": { - "lenses": { - "0": { + "lenses": [ + { "order": 0, - "parts": { - "0": { + "parts": [ + { "position": { "x": 0, "y": 0, @@ -25,7 +25,7 @@ } } }, - "1": { + { "position": { "x": 0, "y": 2, @@ -77,7 +77,7 @@ } } }, - "2": { + { "position": { "x": 2, "y": 2, @@ -129,7 +129,7 @@ } } }, - "3": { + { "position": { "x": 4, "y": 2, @@ -181,7 +181,7 @@ } } }, - "4": { + { "position": { "x": 6, "y": 2, @@ -233,7 +233,7 @@ } } }, - "5": { + { "position": { "x": 8, "y": 2, @@ -285,7 +285,7 @@ } } }, - "6": { + { "position": { "x": 10, "y": 2, @@ -337,7 +337,7 @@ } } }, - "7": { + { "position": { "x": 12, "y": 2, @@ -389,7 +389,7 @@ } } }, - "8": { + { "position": { "x": 14, "y": 2, @@ -441,7 +441,7 @@ } } }, - "9": { + { "position": { "x": 16, "y": 2, @@ -493,7 +493,7 @@ } } }, - "10": { + { "position": { "x": 18, "y": 2, @@ -545,7 +545,7 @@ } } }, - "11": { + { "position": { "x": 21, "y": 2, @@ -597,7 +597,7 @@ } } }, - "12": { + { "position": { "x": 0, "y": 5, @@ -650,7 +650,7 @@ } } }, - "13": { + { "position": { "x": 0, "y": 11, @@ -703,7 +703,7 @@ } } }, - "14": { + { "position": { "x": 0, "y": 17, @@ -756,7 +756,7 @@ } } }, - "15": { + { "position": { "x": 9, "y": 17, @@ -811,7 +811,7 @@ } } }, - "16": { + { "position": { "x": 18, "y": 17, @@ -864,7 +864,7 @@ } } }, - "17": { + { "position": { "x": 0, "y": 23, @@ -916,7 +916,7 @@ } } }, - "18": { + { "position": { "x": 13, "y": 23, @@ -970,7 +970,7 @@ } } }, - "19": { + { "position": { "x": 16, "y": 23, @@ -1022,7 +1022,7 @@ } } }, - "20": { + { "position": { "x": 13, "y": 26, @@ -1074,7 +1074,7 @@ } } }, - "21": { + { "position": { "x": 0, "y": 29, @@ -1127,7 +1127,7 @@ } } }, - "22": { + { "position": { "x": 0, "y": 34, @@ -1180,7 +1180,7 @@ } } }, - "23": { + { "position": { "x": 0, "y": 39, @@ -1201,7 +1201,7 @@ } } }, - "24": { + { "position": { "x": 0, "y": 40, @@ -1254,7 +1254,7 @@ } } }, - "25": { + { "position": { "x": 0, "y": 46, @@ -1307,7 +1307,7 @@ } } }, - "26": { + { "position": { "x": 0, "y": 52, @@ -1360,7 +1360,7 @@ } } }, - "27": { + { "position": { "x": 0, "y": 59, @@ -1413,7 +1413,7 @@ } } }, - "28": { + { "position": { "x": 13, "y": 59, @@ -1466,7 +1466,7 @@ } } }, - "29": { + { "position": { "x": 0, "y": 65, @@ -1519,7 +1519,7 @@ } } }, - "30": { + { "position": { "x": 0, "y": 71, @@ -1572,7 +1572,7 @@ } } }, - "31": { + { "position": { "x": 0, "y": 77, @@ -1625,9 +1625,9 @@ } } } - } + ] } - }, + ], "metadata": { "model": { "timeRange": { @@ -1667,5 +1667,5 @@ "tags": { "hidden-title": "Arc - Estate Profile" }, - "apiVersion": "2015-08-01-preview" + "apiVersion": "2022-12-01-preview" } \ No newline at end of file diff --git a/samples/features/azure-arc/dashboard/Arc - SQL Server Inventory.json b/samples/features/azure-arc/dashboard/Arc - SQL Server Inventory.json index f33f3447..7a10ebd4 100644 --- a/samples/features/azure-arc/dashboard/Arc - SQL Server Inventory.json +++ b/samples/features/azure-arc/dashboard/Arc - SQL Server Inventory.json @@ -1,10 +1,10 @@ { "properties": { "lenses": [ - { + { "order": 0, "parts": [ - { + { "position": { "x": 0, "y": 0, @@ -25,7 +25,7 @@ } } }, - { + { "position": { "x": 0, "y": 2, @@ -77,7 +77,7 @@ } } }, - { + { "position": { "x": 3, "y": 2, @@ -181,7 +181,7 @@ } } }, - { + { "position": { "x": 0, "y": 6, @@ -234,7 +234,7 @@ } } }, - { + { "position": { "x": 0, "y": 11, @@ -287,7 +287,7 @@ } } }, - { + { "position": { "x": 0, "y": 16, @@ -336,11 +336,11 @@ "settings": {}, "partHeader": { "title": "Compatibility Level", - "subtitle": "Count of databases by compatibilty level" + "subtitle": "Count of databases by compatabilty level" } } }, - { + { "position": { "x": 0, "y": 21, @@ -446,7 +446,7 @@ } } }, - { + { "position": { "x": 12, "y": 21, @@ -499,7 +499,7 @@ } } }, - { + { "position": { "x": 0, "y": 27, @@ -548,11 +548,11 @@ "settings": {}, "partHeader": { "title": "SQL Server Edition Summary", - "subtitle": "Count of SQL Server instances by **instsance** license type and edition" + "subtitle": "Count of SQL Server instances by **instances** license type and edition" } } }, - { + { "position": { "x": 12, "y": 27, @@ -606,7 +606,7 @@ } } }, - { + { "position": { "x": 0, "y": 34, @@ -627,7 +627,7 @@ } } }, - { + { "position": { "x": 0, "y": 35, @@ -680,7 +680,7 @@ } } }, - { + { "position": { "x": 0, "y": 42, @@ -731,7 +731,7 @@ }, "partHeader": { "title": "SQL Server Instances by Location", - "subtitle": "SQL Servers instasnces by \"Location\" tag values" + "subtitle": "SQL Servers instances by \"Location\" tag values" } } }, @@ -785,7 +785,7 @@ "content": {} }, "partHeader": { - "title": "SQL Server Instasnces by Data Center", + "title": "SQL Server Instances by Data Center", "subtitle": "SQL Servers instances by \"Datacenter\" tag values." } } @@ -868,5 +868,5 @@ "tags": { "hidden-title": "Arc - SQL Server Inventory" }, - "apiVersion": "2015-08-01-preview" + "apiVersion": "2022-12-01-preview" } diff --git a/samples/features/azure-arc/dashboard/Arc - Server Deployment.json b/samples/features/azure-arc/dashboard/Arc - Server Deployment.json index a6033ae8..b2067900 100644 --- a/samples/features/azure-arc/dashboard/Arc - Server Deployment.json +++ b/samples/features/azure-arc/dashboard/Arc - Server Deployment.json @@ -1,10 +1,10 @@ { "properties": { - "lenses": { - "0": { + "lenses": [ + { "order": 0, - "parts": { - "0": { + "parts": [ + { "position": { "x": 0, "y": 0, @@ -56,7 +56,7 @@ } } }, - "1": { + { "position": { "x": 3, "y": 0, @@ -108,7 +108,7 @@ } } }, - "2": { + { "position": { "x": 0, "y": 4, @@ -161,7 +161,7 @@ } } }, - "3": { + { "position": { "x": 3, "y": 4, @@ -213,7 +213,7 @@ } } }, - "4": { + { "position": { "x": 0, "y": 8, @@ -266,7 +266,7 @@ } } }, - "5": { + { "position": { "x": 3, "y": 8, @@ -318,7 +318,7 @@ } } }, - "6": { + { "position": { "x": 0, "y": 12, @@ -371,7 +371,7 @@ } } }, - "7": { + { "position": { "x": 3, "y": 12, @@ -424,7 +424,7 @@ } } }, - "8": { + { "position": { "x": 0, "y": 16, @@ -477,7 +477,7 @@ } } }, - "9": { + { "position": { "x": 10, "y": 16, @@ -531,7 +531,7 @@ } } }, - "10": { + { "position": { "x": 0, "y": 20, @@ -584,7 +584,7 @@ } } }, - "11": { + { "position": { "x": 10, "y": 20, @@ -638,7 +638,7 @@ } } }, - "12": { + { "position": { "x": 0, "y": 24, @@ -690,7 +690,7 @@ } } }, - "13": { + { "position": { "x": 0, "y": 28, @@ -744,7 +744,7 @@ } } }, - "14": { + { "position": { "x": 6, "y": 28, @@ -797,7 +797,7 @@ } } }, - "15": { + { "position": { "x": 12, "y": 28, @@ -851,7 +851,7 @@ } } }, - "16": { + { "position": { "x": 0, "y": 33, @@ -905,7 +905,7 @@ } } }, - "17": { + { "position": { "x": 6, "y": 33, @@ -959,7 +959,7 @@ } } }, - "18": { + { "position": { "x": 12, "y": 33, @@ -1012,7 +1012,7 @@ } } }, - "19": { + { "position": { "x": 0, "y": 38, @@ -1066,9 +1066,9 @@ } } } - } + ] } - }, + ], "metadata": { "model": { "timeRange": { @@ -1089,5 +1089,5 @@ "tags": { "hidden-title": "Arc Server Deployment" }, - "apiVersion": "2015-08-01-preview" -} + "apiVersion": "2022-12-01-preview" +} \ No newline at end of file diff --git a/samples/features/azure-arc/dashboard/SQL Server Estate Health.json b/samples/features/azure-arc/dashboard/SQL Server Estate Health.json new file mode 100644 index 00000000..f0fcb93e --- /dev/null +++ b/samples/features/azure-arc/dashboard/SQL Server Estate Health.json @@ -0,0 +1,874 @@ +{ + "properties": { + "lenses": [ + { + "order": 0, + "parts": [ + { + "position": { + "x": 0, + "y": 0, + "colSpan": 2, + "rowSpan": 3 + }, + "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.sql/managedinstances\" or \n type == \"microsoft.azurearcdata/sqlserverinstances\" or \n type == \"microsoft.sql/servers\" or \n type==\"microsoft.sqlvirtualmachine/sqlvirtualmachines\"\n| summarize Servers=count()\n", + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/ArgQuerySingleValueTile", + "settings": {}, + "partHeader": { + "title": "Number of Servers", + "subtitle": "" + } + } + }, + { + "position": { + "x": 2, + "y": 0, + "colSpan": 6, + "rowSpan": 4 + }, + "metadata": { + "inputs": [ + { + "name": "isShared", + "isOptional": true + }, + { + "name": "queryId", + "isOptional": true + }, + { + "name": "formatResults", + "isOptional": true + }, + { + "name": "partTitle", + "value": "Query 1", + "isOptional": true + }, + { + "name": "chartType", + "value": 2, + "isOptional": true + }, + { + "name": "queryScope", + "value": { + "scope": 0, + "values": [] + }, + "isOptional": true + }, + { + "name": "query", + "value": "resources\n| where type == \"microsoft.sql/managedinstances\" or \n type == \"microsoft.azurearcdata/sqlserverinstances\" or \n type == \"microsoft.sql/servers\" or \n type == \"microsoft.sqlvirtualmachine/sqlvirtualmachines\"\n| summarize ResourceCount=count() by iff( \n type==\"microsoft.sql/managedinstances\",\"Azure SQL Manage Instance\"\n ,iif(\n type==\"microsoft.azurearcdata/sqlserverinstances\",\"Arc Enable SQL Server\"\n ,iif(\n type==\"microsoft.sql/servers\",\"Azure SQL DB\"\n ,iif(\n type==\"microsoft.sqlvirtualmachine/sqlvirtualmachines\",\"Azure SQL Server On VM\",\"Not Found\"\n )\n )\n )\n )\n", + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/ArgQueryChartTile", + "settings": {}, + "partHeader": { + "title": "Sql Server Type Distributions", + "subtitle": "" + } + } + }, + { + "position": { + "x": 8, + "y": 0, + "colSpan": 6, + "rowSpan": 4 + }, + "metadata": { + "inputs": [ + { + "name": "isShared", + "isOptional": true + }, + { + "name": "queryId", + "isOptional": true + }, + { + "name": "formatResults", + "isOptional": true + }, + { + "name": "partTitle", + "value": "Query 1", + "isOptional": true + }, + { + "name": "chartType", + "value": 2, + "isOptional": true + }, + { + "name": "queryScope", + "value": { + "scope": 0, + "values": [] + }, + "isOptional": true + }, + { + "name": "query", + "value": "// top ten resource types by number of resources\n// Count of all resources\nresources\n| where (type == \"microsoft.sql/managedinstances/databases\" or \n type == \"microsoft.azurearcdata/sqlserverinstances/databases\" or \n type == \"microsoft.sql/servers/databases\" or \n type==\"microsoft.sqlvirtualmachine/sqlvirtualmachines/databases\") and \n (name !in (\"master\",\"model\",\"msdb\") and \n name !contains \"tempdb\")\n| summarize ResourceCount=count() by iff( \n type==\"microsoft.sql/managedinstances/databases\",\"Azure SQL Manage Instance\"\n ,iif(\n type==\"microsoft.azurearcdata/sqlserverinstances/databases\",\"Arc Enable SQL Server\"\n ,iif(\n type==\"microsoft.sql/servers/databases\",\"Azure SQL DB\"\n ,iif(\n type==\"microsoft.sqlvirtualmachine/sqlvirtualmachines/databases\",\"Azure SQL Server On VM\",\"Not Found\"\n )\n )\n )\n )", + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/ArgQueryChartTile", + "settings": {}, + "partHeader": { + "title": "User Databases per Type", + "subtitle": "Does Not Include System Databases" + } + } + }, + { + "position": { + "x": 14, + "y": 0, + "colSpan": 6, + "rowSpan": 4 + }, + "metadata": { + "inputs": [ + { + "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": "chartType", + "value": 2, + "isOptional": true + }, + { + "name": "query", + "value": "resources\r\n| where type == \"microsoft.sql/managedinstances\" or \r\n type == \"microsoft.azurearcdata/sqlserverinstances\" or \r\n type == \"microsoft.sql/servers\" or \r\n type == \"microsoft.sqlvirtualmachine/sqlvirtualmachines\"\r\n| summarize Count=sum(toint(properties['vCore'])) by tostring(properties['edition'])\r\n| where isnotempty (properties_edition)\r\n| order by Count desc", + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/ArgQueryChartTile", + "settings": {}, + "partHeader": { + "title": "Core Count by Edition", + "subtitle": "" + } + } + }, + { + "position": { + "x": 0, + "y": 3, + "colSpan": 2, + "rowSpan": 6 + }, + "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.sql/managedinstances/databases\" or \n type == \"microsoft.azurearcdata/sqlserverinstances/databases\" or \n type == \"microsoft.sql/servers/databases\" )\n| count ", + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/ArgQuerySingleValueTile", + "settings": {}, + "partHeader": { + "title": "Number of Databases", + "subtitle": "Includes all system databases" + } + } + }, + { + "position": { + "x": 2, + "y": 4, + "colSpan": 6, + "rowSpan": 5 + }, + "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.sql/managedinstances\" or \n type == \"microsoft.azurearcdata/sqlserverinstances\" or \n type == \"microsoft.sqlvirtualmachine/sqlvirtualmachines\"\n| summarize Count=count() by iif(type==\"microsoft.azurearcdata/sqlserverinstances\"\n,tostring(properties['edition'])\n, iif(type==\"microsoft.sql/managedinstances\", tostring(sku['tier'])\n,tostring(properties['sqlImageSku'])))\n| order by Count desc", + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/ArgQueryChartTile", + "settings": {}, + "partHeader": { + "title": "Servers per SQL Server Editions", + "subtitle": "" + } + } + }, + { + "position": { + "x": 8, + "y": 4, + "colSpan": 6, + "rowSpan": 5 + }, + "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['licenseType'])\r\n| order by Count desc", + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/ArgQueryChartTile", + "settings": {}, + "partHeader": { + "title": "Cores Per LicenseType", + "subtitle": "" + } + } + }, + { + "position": { + "x": 14, + "y": 4, + "colSpan": 6, + "rowSpan": 5 + }, + "metadata": { + "inputs": [ + { + "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\n| where type == \"microsoft.azurearcdata/sqlserverinstances/databases\"\n| extend prop_db=parse_xml(properties) \n| extend Recovery_Model = prop_db.recoveryMode\n| summarize Count = count() by tostring(Recovery_Model)", + "isOptional": true + }, + { + "name": "chartType", + "value": 1, + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/ArgQueryChartTile", + "settings": {}, + "partHeader": { + "title": "SQL Server Recovery Mode", + "subtitle": "" + } + } + }, + { + "position": { + "x": 0, + "y": 9, + "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": "" + } + } + }, + { + "position": { + "x": 6, + "y": 9, + "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": "" + } + } + }, + { + "position": { + "x": 12, + "y": 9, + "colSpan": 7, + "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": "" + } + } + }, + { + "position": { + "x": 0, + "y": 15, + "colSpan": 6, + "rowSpan": 5 + }, + "metadata": { + "inputs": [ + { + "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": "chartType", + "value": 2, + "isOptional": true + }, + { + "name": "query", + "value": "resources\n| where (type == \"microsoft.sql/managedinstances/databases\" or \n type == \"microsoft.azurearcdata/sqlserverinstances/databases\" or \n type == \"microsoft.sql/servers/databases\" )\n| extend prop_db=parse_xml(properties) \n| extend prop_db_recoveryMode = prop_db.recoveryMode\n| extend prop_db_databaseCreationDate = todatetime(prop_db.databaseCreationDate)\n| extend prop_db_backupInformation = prop_db.backupInformation\n| extend prop_db_backupInformation_lastFullBackup = todatetime(prop_db.backupInformation.lastFullBackup)\n| extend calc_lastBackupAgeDays = iff(isnull(prop_db_backupInformation_lastFullBackup),\n datetime_diff('Day',now(),prop_db_databaseCreationDate),\n datetime_diff('Day',now(),prop_db_backupInformation_lastFullBackup)\n )\n| extend Backup_1day = iif( calc_lastBackupAgeDays <=1 , 1 , 0)\n| extend Backup_7day = iif( calc_lastBackupAgeDays >1 and calc_lastBackupAgeDays <=7 , 1 , 0)\n| extend Backup_over7day = iif( calc_lastBackupAgeDays >7 , 1 , 0)\n| extend Backup_desc = case(\n isnull(prop_db_backupInformation_lastFullBackup), \"no backups at all\", \n datetime_diff('Day',now(),prop_db_backupInformation_lastFullBackup) <= 1, \"1 day\", \n datetime_diff('Day',now(),prop_db_backupInformation_lastFullBackup) <= 7, \"7 days\", \n datetime_diff('Day',now(),prop_db_backupInformation_lastFullBackup) <= 30, \"1 Month\", \n \"older than a month\")\n| project database_name = name, RecoveryModel = prop_db_recoveryMode, Last_Full_Backup = prop_db_backupInformation_lastFullBackup , Backup_Age_Days = calc_lastBackupAgeDays ,Backup_1day ,Backup_7day ,Backup_over7day, Backup_desc\n| summarize Count=count() by Backup_desc", + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/ArgQueryChartTile", + "settings": {}, + "partHeader": { + "title": "SQL Server Backups Intervals", + "subtitle": "" + } + } + }, + { + "position": { + "x": 6, + "y": 15, + "colSpan": 6, + "rowSpan": 5 + }, + "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": "" + } + } + }, + { + "position": { + "x": 12, + "y": 15, + "colSpan": 6, + "rowSpan": 5 + }, + "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.hybridcompute/machines/extensions'\r\n | where properties.type in ('WindowsAgent.SqlServer','LinuxAgent.SqlServer')\r\n | parse id with * '/providers/Microsoft.HybridCompute/machines/' machineName '/extensions/' *\r\n | parse properties with * 'uploadStatus : ' uploadStatus ';' *\r\n | project machineName, uploadStatus, subscriptionId, resourceGroup\r\n //| where uploadStatus !in ('OK') //comment this out to see all upload stats\r\n | order by uploadStatus desc", + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/ArgQueryGridTile", + "settings": {}, + "partHeader": { + "title": "SQL Extension Upload Status", + "subtitle": "" + } + } + }, + { + "position": { + "x": 0, + "y": 20, + "colSpan": 20, + "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.hybridcompute/machines\"\r\n| where properties.detectedProperties.mssqldiscovered == \"true\"\r\n| extend machineIdHasSQLServerDiscovered = id\r\n| project name, machineIdHasSQLServerDiscovered, resourceGroup, subscriptionId\r\n| join kind= leftouter (\r\n resources\r\n | where type == \"microsoft.hybridcompute/machines/extensions\"\r\n | where properties.type in (\"WindowsAgent.SqlServer\",\"LinuxAgent.SqlServer\")\r\n | extend machineIdHasSQLServerExtensionInstalled = iff(id contains \"/extensions/WindowsAgent.SqlServer\" or id contains \"/extensions/LinuxAgent.SqlServer\", substring(id, 0, indexof(id, \"/extensions/\")), \"\")\r\n | project Provisioning_State = properties.provisioningState,\r\n License_Type = properties.settings.LicenseType,\r\n ESU = iff(notnull(properties.settings.enableExtendedSecurityUpdates), \"enabled\", \"\"),\r\n Extension_Version = properties.instanceView.typeHandlerVersion,\r\n Exlcuded_instaces = properties.ExcludedSqlInstances,\r\n Purview = iff(notnull(properties.settings.ExternalPolicyBasedAuthorization),\"enabled\",\"\"),\r\n Entra = iff(notnull(properties.settings.AzureAD),\"enabled\",\"\"),\r\n BPA = iff(notnull(properties.settings.AssessmentSettings),\"enabled\",\"\"),\r\n machineIdHasSQLServerExtensionInstalled)\r\non $left.machineIdHasSQLServerDiscovered == $right.machineIdHasSQLServerExtensionInstalled\r\n| where isnotempty(machineIdHasSQLServerExtensionInstalled)\r\n| project-away machineIdHasSQLServerDiscovered, machineIdHasSQLServerExtensionInstalled", + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/ArgQueryGridTile", + "settings": {}, + "partHeader": { + "title": "Arc SQL details", + "subtitle": "" + } + } + }, + { + "position": { + "x": 0, + "y": 24, + "colSpan": 20, + "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.sql/managedinstances/databases\" or \r\n type == \"microsoft.azurearcdata/sqlserverinstances/databases\" or \r\n type == \"microsoft.sql/servers/databases\" ) and \r\n (name !in (\"master\",\"model\",\"msdb\") and \r\n name !contains \"tempdb\")\r\n| summarize Dbs=count(),Offline=sum(toint(iif(tostring(properties[\"state\"])!=\"Online\" and tostring(properties[\"status\"])!=\"Online\" and tostring(properties[\"status\"])!=\"Paused\" ,1,0)))\r\n,SizeMB=sum(toint(iif(tostring(properties[\"sizeMB\"])!=\"\",properties[\"sizeMB\"],0)))\r\n,Type=max(\r\n iff( type==\"microsoft.sql/managedinstances/databases\",\"Azure SQL Manage Instance\"\r\n ,iif(type==\"microsoft.azurearcdata/sqlserverinstances/databases\",\"Arc Enable SQL Server\"\r\n ,iif(type==\"microsoft.sql/servers/databases\",\"Azure SQL DB\"\r\n ,iif(type==\"microsoft.sqlvirtualmachine/sqlvirtualmachines/databases\",\"Azure SQL Server On VM\",\"Not Found\")\r\n )\r\n )\r\n )\r\n ) 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": "" + } + } + } + ] + } + ], + "metadata": { + "model": { + "timeRange": { + "value": { + "relative": { + "duration": 24, + "timeUnit": 1 + } + }, + "type": "MsPortalFx.Composition.Configuration.ValueTypes.TimeRange" + } + } + } + }, + "name": "SQL Data Estate Health", + "type": "Microsoft.Portal/dashboards", + "location": "INSERT LOCATION", + "tags": { + "hidden-title": "SQL Data Estate Health" + }, + "apiVersion": "2022-12-01-preview" +} \ No newline at end of file diff --git a/samples/features/azure-arc/dashboard/SQL Server Instances.json b/samples/features/azure-arc/dashboard/SQL Server Instances.json index 886cc071..17e8b267 100644 --- a/samples/features/azure-arc/dashboard/SQL Server Instances.json +++ b/samples/features/azure-arc/dashboard/SQL Server Instances.json @@ -1,10 +1,10 @@ { "properties": { - "lenses": { - "0": { + "lenses": [ + { "order": 0, - "parts": { - "0": { + "parts": [ + { "position": { "x": 0, "y": 0, @@ -56,7 +56,7 @@ } } }, - "1": { + { "position": { "x": 3, "y": 0, @@ -109,7 +109,7 @@ } } }, - "2": { + { "position": { "x": 9, "y": 0, @@ -161,7 +161,7 @@ } } }, - "3": { + { "position": { "x": 12, "y": 0, @@ -214,7 +214,7 @@ } } }, - "4": { + { "position": { "x": 0, "y": 5, @@ -266,7 +266,7 @@ } } }, - "5": { + { "position": { "x": 0, "y": 9, @@ -318,7 +318,7 @@ } } }, - "6": { + { "position": { "x": 0, "y": 13, @@ -371,7 +371,7 @@ } } }, - "7": { + { "position": { "x": 6, "y": 13, @@ -424,7 +424,7 @@ } } }, - "8": { + { "position": { "x": 13, "y": 13, @@ -477,7 +477,7 @@ } } }, - "9": { + { "position": { "x": 0, "y": 19, @@ -530,7 +530,7 @@ } } }, - "10": { + { "position": { "x": 6, "y": 19, @@ -583,7 +583,7 @@ } } }, - "11": { + { "position": { "x": 12, "y": 19, @@ -636,7 +636,7 @@ } } }, - "12": { + { "position": { "x": 0, "y": 25, @@ -689,7 +689,7 @@ } } }, - "13": { + { "position": { "x": 6, "y": 25, @@ -742,7 +742,7 @@ } } }, - "14": { + { "position": { "x": 0, "y": 30, @@ -796,9 +796,9 @@ } } } - } + ] } - }, + ], "metadata": { "model": { "timeRange": { @@ -819,5 +819,5 @@ "tags": { "hidden-title": "SQL Server Instances" }, - "apiVersion": "2015-08-01-preview" + "apiVersion": "2022-12-01-preview" }