diff --git a/samples/features/azure-arc/dashboard/Arc - Deployment Progress.json b/samples/features/azure-arc/dashboard/Arc - Deployment Progress.json new file mode 100644 index 00000000..b3df74aa --- /dev/null +++ b/samples/features/azure-arc/dashboard/Arc - Deployment Progress.json @@ -0,0 +1,1705 @@ +{ + "properties": { + "lenses": { + "0": { + "order": 0, + "parts": { + "0": { + "position": { + "x": 0, + "y": 0, + "colSpan": 19, + "rowSpan": 2 + }, + "metadata": { + "inputs": [], + "type": "Extension/HubsExtension/PartType/MarkdownPart", + "settings": { + "content": { + "content": "
\nAzure Arc - Deployment Progress\n
\nThis dashboard tracks the progress of the Azure Arc deployment.\n
\n", + "title": "", + "subtitle": "", + "markdownSource": 1, + "markdownUri": "" + } + } + } + }, + "1": { + "position": { + "x": 0, + "y": 2, + "colSpan": 3, + "rowSpan": 2 + }, + "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 Servers\nresources\n| where type =~ 'microsoft.hybridcompute/machines'\n| summarize ServerCount = count()", + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/ArgQuerySingleValueTile", + "settings": {}, + "partHeader": { + "title": "Servers", + "subtitle": "Count of servers enabled by Azure Arc" + } + } + }, + "2": { + "position": { + "x": 3, + "y": 2, + "colSpan": 4, + "rowSpan": 2 + }, + "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 Cores\nresources\n//Arc registered VMs (Windows & linux)\n| where type == \"microsoft.hybridcompute/machines\"\n//Machine Characteristics\n| extend coreCount = toint(properties.detectedProperties.coreCount)\n| summarize CoreCount = sum(coreCount)", + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/ArgQuerySingleValueTile", + "settings": {}, + "partHeader": { + "title": "Physical Core Count", + "subtitle": "Count of all cores on all servers enabled by Azure Arc" + } + } + }, + "3": { + "position": { + "x": 7, + "y": 2, + "colSpan": 4, + "rowSpan": 2 + }, + "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 \n//Arc registered VMs (Windows & linux)\n| where type == \"microsoft.hybridcompute/machines\"\n| extend provisioningState = tostring(properties.provisioningState)\n| extend status = tostring((properties.status))\n| extend machineName = name\n| extend machineId = tolower(tostring(id))\n| where provisioningState == \"Succeeded\"\n| summarize provisionedServers = count()", + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/ArgQuerySingleValueTile", + "settings": {}, + "partHeader": { + "title": "Provisioned Servers", + "subtitle": "Servers where Provisioning State = \"Succeeded\"" + } + } + }, + "4": { + "position": { + "x": 11, + "y": 2, + "colSpan": 3, + "rowSpan": 2 + }, + "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 \n//Arc registered VMs (Windows & linux)\n| where type == \"microsoft.hybridcompute/machines\"\n| extend provisioningState = tostring(properties.provisioningState)\n| extend status = tostring((properties.status))\n| extend machineName = name\n| extend machineId = tolower(tostring(id))\n| where status == \"Connected\"\n| summarize connectedServers = count()", + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/ArgQuerySingleValueTile", + "settings": {}, + "partHeader": { + "title": "Connected Servers", + "subtitle": "Servers where Status is \"Success\"" + } + } + }, + "5": { + "position": { + "x": 14, + "y": 2, + "colSpan": 5, + "rowSpan": 4 + }, + "metadata": { + "inputs": [], + "type": "Extension/HubsExtension/PartType/MarkdownPart", + "settings": { + "content": { + "content": "
\nConnected and Provisioned Servers\nFully connected Arc enabled servers have a positive connection & provisioning status. Total connected & provisioned servers should ideally equal total servers.\n
.\n", + "title": "", + "subtitle": "", + "markdownSource": 1, + "markdownUri": "" + } + } + } + }, + "6": { + "position": { + "x": 0, + "y": 4, + "colSpan": 3, + "rowSpan": 2 + }, + "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": "//Standard VM Query - used to count Windows Servers\n//Can be used in other queries, pulls out the most important properties for Arc VMs and related SQL Server instances\n//Main Table - All Arc Virtual Machines\nresources\n//Arc registered VMs (Windows & linux)\n| where type == \"microsoft.hybridcompute/machines\"\n//Boolean - SQL installed (true/false)\n| extend mssqlDiscovered = properties.mssqlDiscovered\n//Machine Characteristics\n| extend coreCount = toint(properties.detectedProperties.coreCount)\n| extend logicalCoreCount = toint(properties.detectedProperties.logicalcoreCount)\n| extend processerNames = tostring(properties.detectedProperties.processorNames)\n| extend totalPhysicalMemory = toint(properties.detectedProperties.totalPhysicalMemoryInGigabytes)\n//Machine ID & Name\n| extend machineId = tolower(tostring(id))\n| extend machineName = name\n//Operating System\n| extend osSku = tostring(properties.osSku)\n| extend osName = tostring(properties.osName)\n| extend osVersion = tostring(properties.osVersion)\n//Windows or Linux\n| extend osType = tostring(properties.osType)\n//OS Edition (Datacenter or Standard) \n| extend osEdition = iff(properties.osSku contains \"Datacenter\", \"Datacenter\", \"Standard\")\n| where osType == \"windows\"\n| summarize windowsCount = count()", + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/ArgQuerySingleValueTile", + "settings": {}, + "partHeader": { + "title": "Windows Servers", + "subtitle": "Count of Windws Servers registered to Arc" + } + } + }, + "7": { + "position": { + "x": 3, + "y": 4, + "colSpan": 4, + "rowSpan": 2 + }, + "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": "//Standard VM Query - used to count Windows Servers\n//Can be used in other queries, pulls out the most important properties for Arc VMs and related SQL Server instances\n//Main Table - All Arc Virtual Machines\nresources\n//Arc registered VMs (Windows & linux)\n| where type == \"microsoft.hybridcompute/machines\"\n//Boolean - SQL installed (true/false)\n| extend mssqlDiscovered = properties.mssqlDiscovered\n//Machine Characteristics\n| extend coreCount = toint(properties.detectedProperties.coreCount)\n| extend logicalCoreCount = toint(properties.detectedProperties.logicalcoreCount)\n| extend processerNames = tostring(properties.detectedProperties.processorNames)\n| extend totalPhysicalMemory = toint(properties.detectedProperties.totalPhysicalMemoryInGigabytes)\n//Machine ID & Name\n| extend machineId = tolower(tostring(id))\n| extend machineName = name\n//Operating System\n| extend osSku = tostring(properties.osSku)\n| extend osName = tostring(properties.osName)\n| extend osVersion = tostring(properties.osVersion)\n//Windows or Linux\n| extend osType = tostring(properties.osType)\n//OS Edition (Datacenter or Standard) \n| extend osEdition = iff(properties.osSku contains \"Datacenter\", \"Datacenter\", \"Standard\")\n| where osType == \"windows\"\n| summarize windowsCoreCount = sum(coreCount)", + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/ArgQuerySingleValueTile", + "settings": {}, + "partHeader": { + "title": "Windows Servers Core Count", + "subtitle": "Count of Windws Servers Cores registered to Arc" + } + } + }, + "8": { + "position": { + "x": 7, + "y": 4, + "colSpan": 4, + "rowSpan": 2 + }, + "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\n//Arc registered VMs (Windows & linux)\n| where type == \"microsoft.hybridcompute/machines\"\n//Status\n| extend provisioningState = tostring(properties.provisioningState)\n| extend status = tostring((properties.status))\n//Operating System\n| extend osSku = tostring(properties.osSku)\n| extend osName = tostring(properties.osName)\n| extend osVersion = tostring(properties.osVersion)\n//Windows or Linux\n| extend osType = tostring(properties.osType)\n| where osType == \"windows\"\n| where provisioningState == \"Succeeded\"\n| summarize windowsServerProvisioned = count()", + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/ArgQuerySingleValueTile", + "settings": {}, + "partHeader": { + "title": "Provisioned Windows Server Servers", + "subtitle": "Windows Server servers where Provisioning State = \"Succeded\"" + } + } + }, + "9": { + "position": { + "x": 11, + "y": 4, + "colSpan": 3, + "rowSpan": 2 + }, + "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\n//Arc registered VMs (Windows & linux)\n| where type == \"microsoft.hybridcompute/machines\"\n//Status\n| extend provisioningState = tostring(properties.provisioningState)\n| extend status = tostring((properties.status))\n//Operating System\n| extend osSku = tostring(properties.osSku)\n| extend osName = tostring(properties.osName)\n| extend osVersion = tostring(properties.osVersion)\n//Windows or Linux\n| extend osType = tostring(properties.osType)\n| where osType == \"windows\"\n| where status == \"Connected\"\n| summarize windowsServerProvisioned = count()", + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/ArgQuerySingleValueTile", + "settings": {}, + "partHeader": { + "title": "Connected Windows Server Servers", + "subtitle": "WIndows Server servers which have a \"connected\" status" + } + } + }, + "10": { + "position": { + "x": 0, + "y": 6, + "colSpan": 3, + "rowSpan": 2 + }, + "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\n//Arc registered VMs (Windows & linux)\n| where type == \"microsoft.hybridcompute/machines\"\n//Boolean - SQL installed (true/false)\n| extend mssqlDiscovered = properties.mssqlDiscovered\n| where mssqlDiscovered == 'true'\n| summarize ServerCount = count()", + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/ArgQuerySingleValueTile", + "settings": {}, + "partHeader": { + "title": "Servers with SQL Server Discovered", + "subtitle": "Count of Servers where SQL Server has been discovered" + } + } + }, + "11": { + "position": { + "x": 3, + "y": 6, + "colSpan": 4, + "rowSpan": 2 + }, + "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": " resources\n //Machine extensions resource type\n | where type == \"microsoft.hybridcompute/machines/extensions\"\n //Machine has SQL Server extension\n | where properties.type in (\"WindowsAgent.SqlServer\",\"LinuxAgent.SqlServer\")\n | summarize ExtensionCount = count()\n", + "isOptional": true + }, + { + "name": "queryScope", + "value": { + "scope": 0, + "values": [] + }, + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/ArgQuerySingleValueTile", + "settings": {}, + "partHeader": { + "title": "Servers with SQL Server extension installed", + "subtitle": "Count of servers with SQL Server extension Installed" + } + } + }, + "12": { + "position": { + "x": 7, + "y": 6, + "colSpan": 4, + "rowSpan": 2 + }, + "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": "//SQL VMs with at least one Instance of SQL Server\n//If MSSQLServer is discovered and agent is installed then at least 1 instance of SQL Server should be discovered\n//\n// 1) VMs with SQL\nresources \n//Arc registered VMs (Windows & linux)\n| where type == \"microsoft.hybridcompute/machines\"\n//Boolean - SQL installed (true/false)\n| extend mssqlDiscovered = properties.mssqlDiscovered\n| where mssqlDiscovered == 'true'\n| extend machineName = name\n| extend machineId = tolower(tostring(id))\n// 2) Does the VM host at least 1 instance of SQL Server\n| join kind=inner (\n resources\n | where type == 'microsoft.azurearcdata/sqlserverinstances'\n //SQL Server Version & Edition\n | extend sqlVersion = tostring(properties.version)\n | extend sqlEdition = tostring(properties.edition)\n | extend sqlInstance = name\n //needed for join - container is \"owning\" VM hosting SQL\n | extend containerId = tolower(tostring (properties.containerResourceId))\n | where isnotempty(containerId)\n //Machine may contain multiple instances of different versions & editions - this distinct narrows the count to 1\n | distinct containerId)\non $left.machineId == $right.containerId\n| summarize vmsWithAtLeastOneSQLInstance = count()", + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/ArgQuerySingleValueTile", + "settings": {}, + "partHeader": { + "title": "Servers with at Least One SQL Server Engine Instance", + "subtitle": "Servers with SQL Server discovered and at least 1 instance of SQL Server installed" + } + } + }, + "13": { + "position": { + "x": 11, + "y": 6, + "colSpan": 8, + "rowSpan": 2 + }, + "metadata": { + "inputs": [], + "type": "Extension/HubsExtension/PartType/MarkdownPart", + "settings": { + "content": { + "content": "
\nSQL Instance Metrics\n3 requirements for completed SQL Server Instance registration\n
\n
\n
    \n
  1. SQL Server discovered on Server
  2. \n
  3. SQL Server extension installed correctly
  4. \n
  5. At least 1 SQL Server engine instance created
  6. \n
\n
\n
These 3 metrics will be equal if all SQL Servers have been registered correctly unless some servers have SQL Server installed but not the SQL Server engine role. Some servers may have only some of the other roles like Analysis Services, Reporting Services, or Integration Services.
\n", + "title": "", + "subtitle": "", + "markdownSource": 1, + "markdownUri": "" + } + } + } + }, + "14": { + "position": { + "x": 0, + "y": 8, + "colSpan": 3, + "rowSpan": 2 + }, + "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": "resources\n| where type == 'microsoft.azurearcdata/sqlserverinstances'\n| summarize SQLInstanceCount = count()\n", + "isOptional": true + }, + { + "name": "queryScope", + "value": { + "scope": 0, + "values": [] + }, + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/ArgQuerySingleValueTile", + "settings": {}, + "partHeader": { + "title": "SQL Server Instances", + "subtitle": "Servers can host multiple SQL Server instances" + } + } + }, + "15": { + "position": { + "x": 3, + "y": 8, + "colSpan": 4, + "rowSpan": 2 + }, + "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": "//SQL Server Ent & Standard\n//Count of VMs with at least one Instance of SQL Server Standard or Enterprise\n//\n// 1) VMs with SQL\nresources \n//Arc registered VMs (Windows & linux)\n| where type == \"microsoft.hybridcompute/machines\"\n//Boolean - SQL installed (true/false)\n| extend mssqlDiscovered = properties.mssqlDiscovered\n| where mssqlDiscovered == 'true'\n| extend machineName = name\n| extend machineId = tolower(tostring(id))\n//\n// 2) Does the VM host at least 1 instance of SQL Server Standard or Enterprise\n| join kind=inner (\n resources\n | where type == 'microsoft.azurearcdata/sqlserverinstances'\n //SQL Server Version & Edition\n | extend sqlVersion = tostring(properties.version)\n | extend sqlEdition = tostring(properties.edition)\n | extend sqlInstance = name\n //needed for join - container is \"owning\" VM hosting SQL\n | extend containerId = tolower(tostring (properties.containerResourceId))\n //Does at least one instance contain Enterprise or Standard\n | where sqlEdition in (\"Enterprise\", \"Standard\")\n | where isnotempty(containerId)\n //Machine may contain multiple instances of different versions & editions - this distinct narrows the count to 1\n | distinct containerId)\non $left.machineId == $right.containerId\n| summarize serverCount = count() ", + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/ArgQuerySingleValueTile", + "settings": {}, + "partHeader": { + "title": "Servers with SQL Server Ent/Std Edition", + "subtitle": "Servers with at least one instance of Standard or Enterprisre Edition" + } + } + }, + "16": { + "position": { + "x": 7, + "y": 8, + "colSpan": 4, + "rowSpan": 2 + }, + "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": "//SQL Server Paid/not paid Query - Count of SQL Server VMs with Enterprise or Standard and License Type of \"Paid\"\n//version 1 - returns where at least 1 SQL Server Instance is Standard or Enterprise\n//Complex Query which operates across 3 resource types\n//Goal of Query is to count Machines which have SQL Server installed AND at least one instance of Standard or Enterprise\n//Returns License Type value so we can determine which servers potentially have an incorrect or suboptimal License Type\n//\n//Resource Types used\n//1) resources where type == \"microsoft.hybridcompute/machines\" and mssqlDiscovered == 'true' - Azure Arc VMs holding at least 1 SQL Server install\n//2) resourcecontainers where type == 'microsoft.resources/subscriptions' - Owning subscription for VMs\n//3) resources where type == 'microsoft.azurearcdata/sqlserverinstances' - collection of SQL Server instances on VM\n//Note - we only need to determine if at least one SQL Server Enterprise or Standard exists on the Server, hence the distinct and filter\n//4) resources where type == \"microsoft.hybridcompute/machines/extensions\" and properties.type in (\"WindowsAgent.SqlServer\",\"LinuxAgent.SqlServer\") - Extension holding SQLServer Agent for Server\n//\n// 1) gives us the underlying SQL Server hosting VM\n// 2) gives us the owning subscription\n// 3) selects VMs with at least one instance of SQL Server Standard or Enterprise\n// 4) gets the license status (paid etc)\n//\n// 1) VMs with SQL\nresources \n//Arc registered VMs (Windows & linux)\n| where type == \"microsoft.hybridcompute/machines\"\n//Boolean - SQL installed (true/false)\n| extend mssqlDiscovered = properties.mssqlDiscovered\n| where mssqlDiscovered == 'true'\n| extend machineName = name\n| extend machineId = tolower(tostring(id))\n// 2) Does the VM host at least 1 instance of SQL Server Standard or Enterprise\n| join kind=inner (\n resources\n | where type == 'microsoft.azurearcdata/sqlserverinstances'\n //SQL Server Version & Edition\n | extend sqlVersion = tostring(properties.version)\n | extend sqlEdition = tostring(properties.edition)\n | extend sqlInstance = name\n //needed for join - container is \"owning\" VM hosting SQL\n | extend containerId = tolower(tostring (properties.containerResourceId))\n //Does at least one instance contain Enterprise or Standard\n | where sqlEdition in (\"Enterprise\", \"Standard\")\n | where isnotempty(containerId)\n //Machine may contain multiple instances of different versions & editions - this distinct narrows the count to 1\n | distinct containerId)\non $left.machineId == $right.containerId\n//\n//3) Join for SQL Server Agent to retrieve Server Level License Type\n| join kind=inner (\n resources\n //Machine extensions resource type\n | where type == \"microsoft.hybridcompute/machines/extensions\"\n //Machine has SQL Server extension\n | where properties.type in (\"WindowsAgent.SqlServer\",\"LinuxAgent.SqlServer\")\n | extend licenseType = tostring(properties.settings.LicenseType)\n | where licenseType ==\"Paid\"\n //extract Machine name from ID\n | extend machineIdHasSQLServerExtensionInstalled = tolower(iff(id contains \"/extensions/WindowsAgent.SqlServer\" or id contains \"/extensions/LinuxAgent.SqlServer\", substring(id, 0, indexof(id, \"/extensions/\")), \"\"))\n )\non $left.machineId == $right.machineIdHasSQLServerExtensionInstalled\n| summarize paidServerCount = count()", + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/ArgQuerySingleValueTile", + "settings": {}, + "partHeader": { + "title": "Total SQL Server servers with \"Paid\" License Type", + "subtitle": "Count of all SQL Server servers with Ent/Std Edition and \"Paid\" license type" + } + } + }, + "17": { + "position": { + "x": 11, + "y": 8, + "colSpan": 5, + "rowSpan": 2 + }, + "metadata": { + "inputs": [], + "type": "Extension/HubsExtension/PartType/MarkdownPart", + "settings": { + "content": { + "content": "
\nSQL License Type\nTracks the setting of the SQL Server License Type\n
\n", + "title": "", + "subtitle": "", + "markdownSource": 1, + "markdownUri": "" + } + } + } + }, + "18": { + "position": { + "x": 16, + "y": 8, + "colSpan": 3, + "rowSpan": 2 + }, + "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": "resources\n| where type == \"microsoft.azurearcdata/sqlserverinstances/databases\"\n| summarize countDBs = count()", + "isOptional": true + }, + { + "name": "queryScope", + "value": { + "scope": 0, + "values": [] + }, + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/ArgQuerySingleValueTile", + "settings": {}, + "partHeader": { + "title": "Total SQL Server Databases", + "subtitle": "Count of all databases across all instances" + } + } + }, + "19": { + "position": { + "x": 0, + "y": 10, + "colSpan": 3, + "rowSpan": 2 + }, + "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\n| where type == 'microsoft.azurearcdata/sqlserverinstances'\n| extend provisioningState = tostring(properties.provisioningState)\n| extend status = tostring(properties.status)\n| where provisioningState == \"Succeeded\"\n| summarize succeedededProvisioningInstanceCount = count()", + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/ArgQuerySingleValueTile", + "settings": {}, + "partHeader": { + "title": "Provisioned SQL Server Instasnces", + "subtitle": "Count of SQL Server instances provisioned" + } + } + }, + "20": { + "position": { + "x": 3, + "y": 10, + "colSpan": 4, + "rowSpan": 2 + }, + "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\n| where type == 'microsoft.azurearcdata/sqlserverinstances'\n| extend provisioningState = tostring(properties.provisioningState)\n| extend status = tostring(properties.status)\n| where status == \"Connected\"\n| summarize connectedInstanceCount = count()", + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/ArgQuerySingleValueTile", + "settings": {}, + "partHeader": { + "title": "Connected SQL Server Instances", + "subtitle": "Count of Instances connected fully to Arc" + } + } + }, + "21": { + "position": { + "x": 7, + "y": 10, + "colSpan": 12, + "rowSpan": 2 + }, + "metadata": { + "inputs": [], + "type": "Extension/HubsExtension/PartType/MarkdownPart", + "settings": { + "content": { + "content": "
\nConnected and Provisioned Instances\nWindows & Linux VMs can host multiple SQL Server Instances and so the total number of SQL Server Instances can exceed the number of SQL Server servers (servers with SQL Server discovered). Some servers may have SQL Sewrver discovered but there are no SQL Server engine instances and only other SQL Server roles such as Analysis Services, Reporting Services, or Integration Services are installed. \nTotal Connected & Provisioned instances should ideally equal Total SQL Server instances\n
\n", + "title": "", + "subtitle": "", + "markdownSource": 1, + "markdownUri": "" + } + } + } + }, + "22": { + "position": { + "x": 0, + "y": 12, + "colSpan": 13, + "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//Arc registered VMs (Windows & linux)\n| where type == \"microsoft.hybridcompute/machines\"\n//Boolean - SQL installed (true/false)\n| extend mssqlDiscovered = tostring(properties.mssqlDiscovered)\n| extend provisioningState = tostring(properties.provisioningState)\n| extend status = tostring((properties.status))\n| where mssqlDiscovered == 'true'\n| extend machineName = name\n| extend machineId = tolower(tostring(id))\n//\n//Join for SQL Server Agent for Upload Status\n| join kind=leftouter (\n resources\n //Machine extensions resource type\n | where type == \"microsoft.hybridcompute/machines/extensions\"\n //Machine has SQL Server extension\n | where properties.type in (\"WindowsAgent.SqlServer\",\"LinuxAgent.SqlServer\")\n | parse properties with * 'uploadStatus : ' uploadStatus ';' *\n //extract Machine name from ID\n | extend machineIdHasSQLServerExtensionInstalled = tolower(iff(id contains \"/extensions/WindowsAgent.SqlServer\" or id contains \"/extensions/LinuxAgent.SqlServer\", substring(id, 0, indexof(id, \"/extensions/\")), \"\"))\n )\non $left.machineId == $right.machineIdHasSQLServerExtensionInstalled\n| extend uploadStatus = iff(isnotempty(uploadStatus),uploadStatus,\"Missing SQL Agent\")\n| summarize uploadStatusBreakdown = count() by uploadStatus", + "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 Extension -> DPS Upload Status", + "subtitle": "Extension -> DPS Upload Status indicates if a server is not fully connected. OK is the desired status." + } + } + }, + "23": { + "position": { + "x": 13, + "y": 12, + "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": "query", + "value": "resources\n//Arc registered VMs (Windows & linux)\n| where type == \"microsoft.hybridcompute/machines\"\n//Status\n| extend provisioningState = tostring(properties.provisioningState)\n| extend status = tostring((properties.status))\n//Operating System\n| extend osSku = tostring(properties.osSku)\n| extend osName = tostring(properties.osName)\n| extend osVersion = tostring(properties.osVersion)\n//Windows or Linux\n| extend osType = tostring(properties.osType)\n| where osType == \"windows\"\n//| where status == \"Connected\"\n| summarize windowsServerProvisioned = count() by status", + "isOptional": true + }, + { + "name": "chartType", + "value": 2, + "isOptional": true + }, + { + "name": "queryScope", + "value": { + "scope": 0, + "values": [] + }, + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/ArgQueryChartTile", + "settings": {}, + "partHeader": { + "title": "Windows Server Status", + "subtitle": "WIndows Server by status" + } + } + }, + "24": { + "position": { + "x": 0, + "y": 18, + "colSpan": 19, + "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": "// Arc Queries - All Windows Servers by Subscription, Resource Group, Type\nresources\n| where type =~ 'microsoft.hybridcompute/machines'\n| extend CoreCount = toint (properties.detectedProperties.logicalCoreCount)\n| extend OSVersion = tostring(properties.osSku)\n| extend ESUAttached = iff(properties.licenseProfile.esuProfile.esuKeyState ==\"Inactive\", 0, 1)\n| join kind=inner (\n resourcecontainers\n | where type == 'microsoft.resources/subscriptions'\n | project subscriptionId, subscriptionName = name)\n on subscriptionId\n| project subscriptionName, resourceGroup, OSVersion, ESUAttached, CoreCount\n| summarize ServerCount = count() by subscriptionName\n| order by subscriptionName", + "isOptional": true + }, + { + "name": "chartType", + "value": 1, + "isOptional": true + }, + { + "name": "queryScope", + "value": { + "scope": 0, + "values": [] + }, + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/ArgQueryChartTile", + "settings": {}, + "partHeader": { + "title": "Servers enabled by Subscription", + "subtitle": "Servers enabled by Azure Arc by subscription" + } + } + }, + "25": { + "position": { + "x": 0, + "y": 24, + "colSpan": 19, + "rowSpan": 7 + }, + "metadata": { + "inputs": [ + { + "name": "isShared", + "isOptional": true + }, + { + "name": "queryId", + "isOptional": true + }, + { + "name": "formatResults", + "isOptional": true + }, + { + "name": "partTitle", + "value": "Query 1", + "isOptional": true + }, + { + "name": "query", + "value": "// Arc Queries - All Windows Servers by Location\nresources\n| where type =~ 'microsoft.hybridcompute/machines'\n| extend CoreCount = toint (properties.detectedProperties.logicalCoreCount)\n| extend OSVersion = tostring(properties.osSku)\n| extend ESUAttached = iff(properties.licenseProfile.esuProfile.esuKeyState ==\"Inactive\", 0, 1)\n| extend location = tostring(tags.Location)\n| join kind=inner (\n resourcecontainers\n | where type == 'microsoft.resources/subscriptions'\n | project subscriptionId, subscriptionName = name)\n on subscriptionId\n| project subscriptionName, resourceGroup, OSVersion, ESUAttached, CoreCount, location\n| summarize ServerCount = count() by location\n| order by location", + "isOptional": true + }, + { + "name": "chartType", + "value": 1, + "isOptional": true + }, + { + "name": "queryScope", + "value": { + "scope": 0, + "values": [] + }, + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/ArgQueryChartTile", + "settings": {}, + "partHeader": { + "title": "Servers by \"Location\" tag", + "subtitle": "Servers enabled by Azure Arc by \"Location\" tag" + } + } + }, + "26": { + "position": { + "x": 0, + "y": 31, + "colSpan": 9, + "rowSpan": 7 + }, + "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": "//Servers by OS Version\nresources\n| where type =~ 'microsoft.hybridcompute/machines'\n| extend OSVersion = tostring(properties.osSku)\n| project OSVersion\n| summarize ServerCount = count() by OSVersion\n| order by ServerCount desc ", + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/ArgQueryChartTile", + "settings": {}, + "partHeader": { + "title": "Servers by OS", + "subtitle": "Servers enabled by Azure Arc by OS version" + } + } + }, + "27": { + "position": { + "x": 9, + "y": 31, + "colSpan": 10, + "rowSpan": 7 + }, + "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": "// Arc Queries - All Windows Servers by Subscription, Resource Group, Type\r\nresources\r\n| where type =~ 'microsoft.hybridcompute/machines'\r\n| extend CoreCount = toint (properties.detectedProperties.logicalCoreCount)\r\n| extend OSVersion = tostring(properties.osSku)\r\n| extend ESUAttached = iff(properties.licenseProfile.esuProfile.esuKeyState ==\"Inactive\", 0, 1)\r\n| join kind=inner (\r\n resourcecontainers\r\n | where type == 'microsoft.resources/subscriptions'\r\n | project subscriptionId, subscriptionName = name)\r\n on subscriptionId\r\n| project subscriptionName, resourceGroup, OSVersion, ESUAttached, CoreCount\r\n| summarize ServerCount = count() by subscriptionName, resourceGroup, OSVersion", + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/ArgQueryGridTile", + "settings": {}, + "partHeader": { + "title": "Servers - Summary", + "subtitle": "All servers by subscription, resource group, and OS version" + } + } + }, + "28": { + "position": { + "x": 0, + "y": 38, + "colSpan": 9, + "rowSpan": 7 + }, + "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": "// Run query to see results.\nresources\n| where type == \"microsoft.azurearcdata/sqlserverinstances\"\n//| where type == \"microsoft.hybridcompute/machines\"\n//| where properties.detectedProperties.mssqldiscovered == \"true\"\n| extend d=parse_json(properties)\n| extend Patch=d[\"patchLevel\"]\n| extend SQLVersion=tostring(d[\"version\"])\n| extend Edition=d[\"edition\"]\n| extend License=d[\"licenseType\"]\n| project name, Patch, SQLVersion, Edition, License\n| summarize SQLServerVersionCount=count() by SQLVersion\n| order by SQLServerVersionCount desc ", + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/ArgQueryChartTile", + "settings": {}, + "partHeader": { + "title": "SQL Server Instances by Version", + "subtitle": "SQL Server instasnces enabled by Azure Arc by SQL Server version" + } + } + }, + "29": { + "position": { + "x": 9, + "y": 38, + "colSpan": 10, + "rowSpan": 7 + }, + "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//Arc registered VMs (Windows & linux)\n| where type == \"microsoft.hybridcompute/machines\"\n//Boolean - SQL installed (true/false)\n| extend mssqlDiscovered = tostring(properties.mssqlDiscovered)\n//| where mssqlDiscovered == 'true'\n| extend machineName = name\n| extend machineId = tolower(tostring(id))\n//\n// 2) Subscription Name\n| join kind=inner (\n resourcecontainers\n | where type == 'microsoft.resources/subscriptions'\n | project subscriptionId, subscriptionName = name)\n on subscriptionId\n//\n// 3) Does the VM host at least 1 instance of SQL Server Standard or Enterprise\n| join kind=inner (\n resources\n | where type == 'microsoft.azurearcdata/sqlserverinstances'\n //SQL Server Version & Edition\n | extend sqlVersion = tostring(properties.version)\n | extend sqlEdition = tostring(properties.edition)\n | extend sqlInstance = name\n //needed for join - container is \"owning\" VM hosting SQL\n | extend containerId = tolower(tostring (properties.containerResourceId))\n //Does at least one instance contain Enterprise or Standard\n | where sqlEdition in (\"Enterprise\", \"Standard\")\n | where isnotempty(containerId)\n //Machine may contain multiple instances of different versions & editions - this distinct narrows the count to 1\n | distinct containerId)\non $left.machineId == $right.containerId\n//\n//4) Join for SQL Server Agent to retrieve Server Level License Type\n| join kind=leftouter (\n resources\n //Machine extensions resource type\n | where type == \"microsoft.hybridcompute/machines/extensions\"\n //Machine has SQL Server extension\n | where properties.type in (\"WindowsAgent.SqlServer\",\"LinuxAgent.SqlServer\")\n | extend licenseType = tostring(properties.settings.LicenseType)\n | extend licenseType = iff(isnotempty(licenseType), licenseType, \"License Type not set\")\n //extract Machine name from ID\n | extend machineIdHasSQLServerExtensionInstalled = tolower(iff(id contains \"/extensions/WindowsAgent.SqlServer\" or id contains \"/extensions/LinuxAgent.SqlServer\", substring(id, 0, indexof(id, \"/extensions/\")), \"\"))\n )\non $left.machineId == $right.machineIdHasSQLServerExtensionInstalled\n| extend licenseType = iff(isnotempty(licenseType), licenseType, \"Missing SQL Agent\")\n| project subscriptionName, resourceGroup, machineName, licenseType\n| summarize serverCount = count() by licenseType", + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/ArgQueryChartTile", + "settings": {}, + "partHeader": { + "title": "SQL Server License Type for Enterprise & Standard", + "subtitle": "SQL Server server license type across all servers hosting Ent & Std Edition SQL Server instances" + } + } + }, + "30": { + "position": { + "x": 0, + "y": 45, + "colSpan": 19, + "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": "//SQL Server Paid/not paid Query\r\n//version 1 - returns where at least 1 SQL Server Instance is Standard or Enterprise\r\n//Complex Query which operates across 3 resource types\r\n//Goal of Query is to count Machines which have SQL Server installed AND at least one instance of Standard or Enterprise\r\n//Returns License Type value so we can determine which servers potentially have an incorrect or suboptimal License Type\r\n//\r\n//Resource Types used\r\n//1) resources where type == \"microsoft.hybridcompute/machines\" and mssqlDiscovered == 'true' - Azure Arc VMs holding at least 1 SQL Server install\r\n//2) resourcecontainers where type == 'microsoft.resources/subscriptions' - Owning subscription for VMs\r\n//3) resources where type == 'microsoft.azurearcdata/sqlserverinstances' - collection of SQL Server instances on VM\r\n//Note - we only need to determine if at least one SQL Server Enterprise or Standard exists on the Server, hence the distinct and filter\r\n//4) resources where type == \"microsoft.hybridcompute/machines/extensions\" and properties.type in (\"WindowsAgent.SqlServer\",\"LinuxAgent.SqlServer\") - Extension holding SQLServer Agent for Server\r\n//\r\n// 1) gives us the underlying SQL Server hosting VM\r\n// 2) gives us the owning subscription\r\n// 3) selects VMs with at least one instance of SQL Server Standard or Enterprise\r\n// 4) gets the license status (paid etc)\r\n//\r\n// 1) VMs with SQL\r\nresources \r\n//Arc registered VMs (Windows & linux)\r\n| where type == \"microsoft.hybridcompute/machines\"\r\n//Boolean - SQL installed (true/false)\r\n| extend mssqlDiscovered = properties.mssqlDiscovered\r\n| where mssqlDiscovered == 'true'\r\n| extend machineName = name\r\n| extend machineId = tolower(tostring(id))\r\n//\r\n// 2) Subscription Name\r\n| join kind=inner (\r\n resourcecontainers\r\n | where type == 'microsoft.resources/subscriptions'\r\n | project subscriptionId, subscriptionName = name)\r\n on subscriptionId\r\n//\r\n// 3) Does the VM host at least 1 instance of SQL Server Standard or Enterprise\r\n| join kind=inner (\r\n resources\r\n | where type == 'microsoft.azurearcdata/sqlserverinstances'\r\n //SQL Server Version & Edition\r\n | extend sqlVersion = tostring(properties.version)\r\n | extend sqlEdition = tostring(properties.edition)\r\n | extend sqlInstance = name\r\n //needed for join - container is \"owning\" VM hosting SQL\r\n | extend containerId = tolower(tostring (properties.containerResourceId))\r\n //Does at least one instance contain Enterprise or Standard\r\n | where sqlEdition in (\"Enterprise\", \"Standard\")\r\n | where isnotempty(containerId)\r\n //Machine may contain multiple instances of different versions & editions - this distinct narrows the count to 1\r\n | distinct containerId)\r\non $left.machineId == $right.containerId\r\n//\r\n//4) Join for SQL Server Agent to retrieve Server Level License Type\r\n| join kind=inner (\r\n resources\r\n //Machine extensions resource type\r\n | where type == \"microsoft.hybridcompute/machines/extensions\"\r\n //Machine has SQL Server extension\r\n | where properties.type in (\"WindowsAgent.SqlServer\",\"LinuxAgent.SqlServer\")\r\n | extend licenseType = tostring(properties.settings.LicenseType)\r\n //extract Machine name from ID\r\n | extend machineIdHasSQLServerExtensionInstalled = tolower(iff(id contains \"/extensions/WindowsAgent.SqlServer\" or id contains \"/extensions/LinuxAgent.SqlServer\", substring(id, 0, indexof(id, \"/extensions/\")), \"\"))\r\n )\r\non $left.machineId == $right.machineIdHasSQLServerExtensionInstalled\r\n| project subscriptionName, resourceGroup, machineName, licenseType\r\n| summarize serverCount = count() by subscriptionName, resourceGroup, licenseType\r\n", + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/ArgQueryGridTile", + "settings": {}, + "partHeader": { + "title": "SQL Server License Type Settings by Subscription, Resource Group for Enterprise & Standard", + "subtitle": "SQL Server License Type settings for \"production\" SQL Server servers" + } + } + }, + "31": { + "position": { + "x": 0, + "y": 51, + "colSpan": 19, + "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": "query", + "value": "// Arc Queries - All Windows Servers by Subscription, Resource Group, Type\r\nresources\r\n| where type =~ 'microsoft.hybridcompute/machines'\r\n| extend CoreCount = toint (properties.detectedProperties.logicalCoreCount)\r\n| extend OSVersion = tostring(properties.osSku)\r\n| extend ESUAttached = iff(properties.licenseProfile.esuProfile.esuKeyState ==\"Inactive\", 0, 1)\r\n| join kind=inner (\r\n resourcecontainers\r\n | where type == 'microsoft.resources/subscriptions'\r\n | project subscriptionId, subscriptionName = name)\r\n on subscriptionId\r\n| project subscriptionName, resourceGroup, OSVersion, ESUAttached, CoreCount\r\n| summarize ServerCount = count() , TotalCores = sum(CoreCount), TotalESU =sum(ESUAttached) by subscriptionName, resourceGroup, OSVersion", + "isOptional": true + }, + { + "name": "queryScope", + "value": { + "scope": 0, + "values": [] + }, + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/ArgQueryGridTile", + "settings": {}, + "partHeader": { + "title": "Servers - Summary", + "subtitle": "All servers by subscription, resource group, OS version" + } + } + }, + "32": { + "position": { + "x": 0, + "y": 56, + "colSpan": 19, + "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": "// Run query to see results.\r\nresources\r\n| where type == \"microsoft.azurearcdata/sqlserverinstances\"\r\n| extend d=parse_json(properties)\r\n| extend Patch=d[\"patchLevel\"]\r\n| extend SQLVersion=d[\"version\"]\r\n| extend Edition=d[\"edition\"]\r\n| extend License=d[\"licenseType\"]\r\n| join kind=inner (\r\n resourcecontainers\r\n | where type == 'microsoft.resources/subscriptions'\r\n | project subscriptionId, subscriptionName = name)\r\n on subscriptionId\r\n| project subscriptionName, resourceGroup, Patch, SQLVersion, Edition, License\r\n| summarize ServerCount=count() by subscriptionName, resourceGroup, tostring(SQLVersion)", + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/ArgQueryGridTile", + "settings": {}, + "partHeader": { + "title": "SQL Server instances - Summary", + "subtitle": "All SQL Server instances by subscription, resource group, version" + } + } + }, + "33": { + "position": { + "x": 0, + "y": 61, + "colSpan": 19, + "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": "//Standard VM Query - VM alone\r\n//Can be used in other queries, pulls out the most important properties for Arc VMs\r\n//Main Table - All Arc Virtual Machines\r\nresources\r\n//Arc registered VMs (Windows & linux)\r\n| where type == \"microsoft.hybridcompute/machines\"\r\n//Boolean - SQL installed (true/false)\r\n| extend mssqlDiscovered = properties.mssqlDiscovered\r\n//Machine Characteristics\r\n| extend coreCount = toint(properties.detectedProperties.coreCount)\r\n| extend logicalCoreCount = toint(properties.detectedProperties.logicalcoreCount)\r\n| extend processerNames = tostring(properties.detectedProperties.processorNames)\r\n| extend totalPhysicalMemory = toint(properties.detectedProperties.totalPhysicalMemoryInGigabytes)\r\n//Machine ID & Name\r\n| extend machineId = tolower(tostring(id))\r\n| extend machineName = name\r\n//Operating System\r\n| extend osSku = tostring(properties.osSku)\r\n| extend osName = tostring(properties.osName)\r\n| extend osVersion = tostring(properties.osVersion)\r\n//Windows or Linux\r\n| extend osType = tostring(properties.osType)\r\n//OS Edition (Datacenter or Standard) \r\n| extend osEdition = iff(properties.osSku contains \"Datacenter\", \"Datacenter\", \"Standard\")\r\n//ESU Assignment (esu eligibility - OS is ESU capable, License Assignment State - OS does/does not have ESU assigned\r\n| extend ESU = properties.licenseProfile.esuProfile.licenseAssignmentState\r\n| extend esuEligibility = tostring(properties.licenseProfile.esuProfile.esuEligibility)\r\n//Type of ESU assigned (Standard/Data center)\r\n| extend serverType = tostring(properties.licenseProfile.esuProfile.serverType)\r\n//\r\n//Include below if Subscription Name needed\r\n| join kind=inner (\r\n resourcecontainers\r\n | where type == 'microsoft.resources/subscriptions'\r\n | project subscriptionId, subscriptionName = name)\r\n on subscriptionId\r\n//Agent Status\r\n| join kind=leftouter (\r\n\t//Provisioned Servers\r\n\t//It is possible for a Server to be known to Arc but not fully provisioned - this query checks that state\r\n\tresources\r\n\t//Machine extensions resource type\r\n\t| where type == \"microsoft.hybridcompute/machines/extensions\"\r\n\t//Search for Approriate Agent\r\n\t| where properties.['type'] in (\"AzureMonitorWindowsAgent\", \"AzureMonitorLinuxAgent\")\r\n\t//extract Machine name from ID\r\n\t| extend machineIdHasAgentExtensionInstalled = tolower(iff(id contains \"/extensions/AzureMonitorWindowsAgent\" or id contains \"/extensions/AzureMonitorLinuxAgent\", substring(id, 0, indexof(id, \"/extensions/\")), \"\"))\r\n\t| extend provisioningState = properties.provisioningState\r\n\t| extend status = properties.instanceView.status.message\r\n\t)\r\non $left.machineId == $right.machineIdHasAgentExtensionInstalled", + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/ArgQueryGridTile", + "settings": {}, + "partHeader": { + "title": "Servers - Detail", + "subtitle": "All servers enabled by Azure Arc" + } + } + }, + "34": { + "position": { + "x": 0, + "y": 67, + "colSpan": 19, + "rowSpan": 5 + }, + "metadata": { + "inputs": [ + { + "name": "partTitle", + "value": "Query 1", + "isOptional": true + }, + { + "name": "chartType", + "isOptional": true + }, + { + "name": "isShared", + "isOptional": true + }, + { + "name": "queryId", + "isOptional": true + }, + { + "name": "formatResults", + "isOptional": true + }, + { + "name": "queryScope", + "value": { + "scope": 0, + "values": [] + }, + "isOptional": true + }, + { + "name": "query", + "value": "//All Servers and all SQL Server Instances\r\n//version 1 - Comprehensive query which returns all VMs and also all SQL instances on\r\n//those VMs if they exist.\r\n//used to diagnose missing Agents, License type etc\r\n//Complex Query which operates across 3 resource types\r\n//\r\n//Resource Types used\r\n//1) resources where type == \"microsoft.hybridcompute/machines\" - All VMs\r\n//2) resourcecontainers where type == 'microsoft.resources/subscriptions' - Owning subscription for VMs\r\n//3) resources where type == 'microsoft.azurearcdata/sqlserverinstances' - collection of SQL Server instances on VM if they exist (outer join used)\r\n//4) resources where type == \"microsoft.hybridcompute/machines/extensions\" and properties.type in (\"WindowsAgent.SqlServer\",\"LinuxAgent.SqlServer\") - Extension holding SQLServer Agent for Server if it exists (again, outer join used)\r\n//\r\n// 1) gives us the underlying VM\r\n// 2) gives us the owning subscription\r\n// 3) Selects all Instances\r\n// 4) gets the license status (paid etc) & ESU Status\r\n//\r\n// 1) VMs with SQL\r\nresources \r\n//Arc registered VMs (Windows & linux)\r\n| where type == \"microsoft.hybridcompute/machines\"\r\n| extend mssqlDiscovered = properties.mssqlDiscovered\r\n//Machine Characteristics\r\n| extend coreCount = toint(properties.detectedProperties.coreCount)\r\n| extend logicalCoreCount = toint(properties.detectedProperties.logicalcoreCount)\r\n| extend processerNames = tostring(properties.detectedProperties.processorNames)\r\n| extend totalPhysicalMemory = toint(properties.detectedProperties.totalPhysicalMemoryInGigabytes)\r\n//Machine ID & Name\r\n| extend machineId = tolower(tostring(id))\r\n| extend machineName = name\r\n//Operating System\r\n| extend osSku = tostring(properties.osSku)\r\n| extend osName = tostring(properties.osName)\r\n| extend osVersion = tostring(properties.osVersion)\r\n//Windows or Linux\r\n| extend osType = tostring(properties.osType)\r\n//OS Edition (Datacenter or Standard) \r\n| extend osEdition = iff(osType == \"linux\", \"N/A\",iff(properties.osSku contains \"Datacenter\", \"Datacenter\", \"Standard\"))\r\n//ESU Assignment (esu eligibility - OS is ESU capable, License Assignment State - OS does/does not have ESU assigned\r\n| extend osESU = properties.licenseProfile.esuProfile.licenseAssignmentState\r\n| extend osEsuEligibility = tostring(properties.licenseProfile.esuProfile.esuEligibility)\r\n//Type of ESU assigned (Standard/Data center)\r\n| extend osESUServerType = tostring(properties.licenseProfile.esuProfile.serverType)\r\n//\r\n// 2) Subscription Name\r\n| join kind=inner (\r\n resourcecontainers\r\n | where type == 'microsoft.resources/subscriptions'\r\n | project subscriptionId, subscriptionName = name)\r\n on subscriptionId\r\n//\r\n// 3) Does the VM host at least 1 instance of SQL Server Standard or Enterprise\r\n| join kind = leftouter (\r\n resources\r\n | where type == 'microsoft.azurearcdata/sqlserverinstances'\r\n //SQL Server Version & Edition\r\n | extend sqlVersion = tostring(properties.version)\r\n | extend sqlEdition = tostring(properties.edition)\r\n | extend sqlInstance = name\r\n | extend provisioningState = tostring(properties.provisioningState)\r\n | extend status = tostring(properties.status)\r\n | extend sqlID = ['id']\r\n //needed for join - container is \"owning\" VM hosting SQL\r\n | extend containerId = tolower(tostring (properties.containerResourceId))\r\n | where isnotempty(containerId)\r\n | extend sqlSku = sku\r\n | extend sqlLocation = location\r\n | extend sqlTags = ['tags']\r\n | extend sqlProperties = properties\r\n | project-away subscriptionId, resourceGroup, ['type'], tenantId, name, ['id'], kind, location, ['tags'], properties\r\n)\r\non $left.machineId == $right.containerId\r\n//\r\n//4) Join for SQL Server Agent to retrieve Server Level License Type\r\n| join kind=leftouter (\r\n resources\r\n //Machine extensions resource type\r\n | where type == \"microsoft.hybridcompute/machines/extensions\"\r\n //Machine has SQL Server extension\r\n | where properties.type in (\"WindowsAgent.SqlServer\",\"LinuxAgent.SqlServer\")\r\n | extend sqlAgentInstalled = \"Yes\"\r\n | extend licenseType = tostring(properties.settings.LicenseType)\r\n | extend agentName = name\r\n //extract Machine name from ID\r\n | extend machineIdHasSQLServerExtensionInstalled = tolower(iff(id contains \"/extensions/WindowsAgent.SqlServer\" or id contains \"/extensions/LinuxAgent.SqlServer\", substring(id, 0, indexof(id, \"/extensions/\")), \"\"))\r\n | extend sqlEnableExtendedSecurityUpdates = properties.settings.enableExtendedSecurityUpdates\r\n | extend sqlESU = iff(notnull(sqlEnableExtendedSecurityUpdates), iff(sqlEnableExtendedSecurityUpdates == true,\"enabled\",\"disabled\"), \"N/A\")\r\n | project-away name, resourceGroup, subscriptionId\r\n )\r\non $left.machineId == $right.machineIdHasSQLServerExtensionInstalled\r\n| join kind=leftouter (\r\n\t//Provisioned Servers\r\n\t//It is possible for a Server to be known to Arc but not fully provisioned - this query checks that state\r\n\tresources\r\n\t//Machine extensions resource type\r\n\t| where type == \"microsoft.hybridcompute/machines/extensions\"\r\n\t//Search for Approriate Agent\r\n\t| where properties.['type'] in (\"AzureMonitorWindowsAgent\", \"AzureMonitorLinuxAgent\")\r\n\t//extract Machine name from ID\r\n\t| extend machineIdHasAgentExtensionInstalled = tolower(iff(id contains \"/extensions/AzureMonitorWindowsAgent\" or id contains \"/extensions/AzureMonitorLinuxAgent\", substring(id, 0, indexof(id, \"/extensions/\")), \"\"))\r\n\t| extend provisioningState = properties.provisioningState\r\n\t| extend status = properties.instanceView.status.message\r\n\t)\r\non $left.machineId == $right.machineIdHasAgentExtensionInstalled", + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/ArgQueryGridTile", + "settings": { + "content": {} + }, + "partHeader": { + "title": "SQL Server Instances - Detail", + "subtitle": "All SQL Serve instances on Arc enabled servers" + } + } + } + } + } + }, + "metadata": { + "model": { + "timeRange": { + "value": { + "relative": { + "duration": 24, + "timeUnit": 1 + } + }, + "type": "MsPortalFx.Composition.Configuration.ValueTypes.TimeRange" + } + } + } + }, + "name": "Arc - Deployment Progress", + "type": "Microsoft.Portal/dashboards", + "location": "INSERT LOCATION", + "tags": { + "hidden-title": "Arc - Deployment Progress" + }, + "apiVersion": "2015-08-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 new file mode 100644 index 00000000..b42ac4d9 --- /dev/null +++ b/samples/features/azure-arc/dashboard/Arc - ESU.json @@ -0,0 +1,801 @@ +{ + "properties": { + "lenses": { + "0": { + "order": 0, + "parts": { + "0": { + "position": { + "x": 0, + "y": 0, + "colSpan": 18, + "rowSpan": 2 + }, + "metadata": { + "inputs": [], + "type": "Extension/HubsExtension/PartType/MarkdownPart", + "settings": { + "content": { + "content": "
\nAzure Arc - Extended Security Updates (ESU) for Windows Server and SQL Server
\nThis dashboard tracks ESU for Windows Server & SQL Server 2012/2014\n
\n", + "title": "", + "subtitle": "", + "markdownSource": 1, + "markdownUri": "" + } + } + } + }, + "1": { + "position": { + "x": 0, + "y": 2, + "colSpan": 6, + "rowSpan": 1 + }, + "metadata": { + "inputs": [], + "type": "Extension/HubsExtension/PartType/MarkdownPart", + "settings": { + "content": { + "content": "
\nWindows 2012 - \nEnd of Life - 10th October 2023\n
\n", + "title": "", + "subtitle": "", + "markdownSource": 1, + "markdownUri": "" + } + } + } + }, + "2": { + "position": { + "x": 6, + "y": 2, + "colSpan": 6, + "rowSpan": 1 + }, + "metadata": { + "inputs": [], + "type": "Extension/HubsExtension/PartType/MarkdownPart", + "settings": { + "content": { + "content": "
\nSQL Server 2012 - \nEnd of Life - 12th July 2022\n
\n", + "title": "", + "subtitle": "", + "markdownSource": 1, + "markdownUri": "" + } + } + } + }, + "3": { + "position": { + "x": 12, + "y": 2, + "colSpan": 6, + "rowSpan": 1 + }, + "metadata": { + "inputs": [], + "type": "Extension/HubsExtension/PartType/MarkdownPart", + "settings": { + "content": { + "content": "
\nSQL Server 2014 - \nPlanned End of Life - 9th July 2024\n
\n", + "title": "", + "subtitle": "", + "markdownSource": 1, + "markdownUri": "" + } + } + } + }, + "4": { + "position": { + "x": 0, + "y": 3, + "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": 2, + "isOptional": true + }, + { + "name": "queryScope", + "value": { + "scope": 0, + "values": [] + }, + "isOptional": true + }, + { + "name": "query", + "value": "//Query - All Arc Registered Windows 2012 Servers broken down by ESU assigned/not assigned\nresources\n| where type =~ 'microsoft.hybridcompute/machines'\n| extend osSku = tostring(properties.osSku)\n//ESU Assignment (esu eligibility - OS is ESU capable, License Assignment State - OS does/does not have ESU assigned\n| extend ESU = tostring(properties.licenseProfile.esuProfile.licenseAssignmentState)\n| extend esuEligibility = tostring(properties.licenseProfile.esuProfile.esuEligibility)\n| extend esuCount = iff(ESU == \"NotAssigned\",0,1)\n//Change to \"Windows Server 2012\" for live version\n| where osSku contains \"Windows Server 2012\" \n| summarize ServerCount = count() by ESU", + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/ArgQueryChartTile", + "settings": {}, + "partHeader": { + "title": "Windows Server 2012 ESU License State", + "subtitle": "All WIndows Server 2012 servers by ESU license state" + } + } + }, + "5": { + "position": { + "x": 6, + "y": 3, + "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": "//Assigned ESU for SQL Query\n//This is a 3 part query - needs to include all VMs that have SQL Server installed as an instance (and to subselect for ESU eligible\n//SQL Server versions) and then all Machine extensions which contain the ESU assigned True/False flag\n//This query can then be used to determine ESU assignment by SQL Version, Edition, Tag (Application), Location etc\n//Main Table - All Arc Virtual Machines\nresources\n| where type == \"microsoft.hybridcompute/machines\"\n| extend mssqlDiscovered = properties.mssqlDiscovered\n//Performance - select only machines with SQL Server detected\n| where mssqlDiscovered == 'true'\n| extend coreCount = toint(properties.detectedProperties.coreCount)\n| extend machineId = tolower(tostring(id))\n| extend machineName = name\n| join kind=inner (\n //Sub Table - Select distinct SQL Server Version (and select on SQL Server 2012)\n resources\n | where type == 'microsoft.azurearcdata/sqlserverinstances'\n | extend version = tostring(properties.version)\n | extend edition = properties.edition\n | extend containerId = tolower(tostring (properties.containerResourceId))\n //add clause back in for live dashboard\n | where version contains \"2012\"\n | where edition in (\"Enterprise\", \"Standard\")\n | where isnotempty(containerId)\n | extend SQL_instance = name\n //Machine may contain multiple instances - this distinct selects the first (assuming all instances on same machine are same SQL Version)\n | distinct containerId)\non $left.machineId == $right.containerId\n| join kind=inner (\n //Sub Table - Identify if SQL ESUs assigned\n resources\n //Machine extensions resource type\n | where type == \"microsoft.hybridcompute/machines/extensions\"\n //Machine has SQL Server extension\n | where properties.type in (\"WindowsAgent.SqlServer\",\"LinuxAgent.SqlServer\")\n //extract Machine name from ID\n | extend machineIdHasSQLServerExtensionInstalled = tolower(iff(id contains \"/extensions/WindowsAgent.SqlServer\" or id contains \"/extensions/LinuxAgent.SqlServer\", substring(id, 0, indexof(id, \"/extensions/\")), \"\"))\n //enableExtendedSecurityUpdates has 3 values - Null (ESU not applicable), True (ESU applicable and enabled), False (ESU applicable and disabled)\n | extend ESU = iff(notnull(properties.settings.enableExtendedSecurityUpdates), iff(properties.settings.enableExtendedSecurityUpdates == true,\"enabled\",\"disabled\"), \"N/A\")\n | project machineIdHasSQLServerExtensionInstalled, Extension_State = properties.provisioningState, License_Type = properties.settings.LicenseType,ESU, Extension_Version = properties.instanceView.typeHandlerVersion\n)\non $left.machineId == $right.machineIdHasSQLServerExtensionInstalled\n//| distinct Machine_name, ESU\n//| summarize count(), sum(coreCount) by ESU\n| summarize count() by ESU", + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/ArgQueryChartTile", + "settings": {}, + "partHeader": { + "title": "SQL Server 2012 ESU License State", + "subtitle": "All SQL Server 2012 servers by ESU license state" + } + } + }, + "6": { + "position": { + "x": 12, + "y": 3, + "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": 2, + "isOptional": true + }, + { + "name": "queryScope", + "value": { + "scope": 0, + "values": [] + }, + "isOptional": true + }, + { + "name": "query", + "value": "//Query - All Arc Registered Windows 2014 Servers (SQL Server 2014 will be End of Life shortly)\nresources\n| where type == \"microsoft.azurearcdata/sqlserverinstances\"\n| extend version = tostring(properties['version'])\n//ESU Assignment (esu eligibility - OS is ESU capable, License Assignment State - OS does/does not have ESU assigned\n| extend ESU = tostring(properties.licenseProfile.esuProfile.licenseAssignmentState)\n| extend esuEligibility = tostring(properties.licenseProfile.esuProfile.esuEligibility)\n| extend esuCount = iff(ESU == \"NotAssigned\",0,1)\n// Change to SQL Server 2014 for live version\n| where ['version'] == \"SQL Server 2014\"\n// No ESUs as yet for SQL Server 2014, however pie chart used for consistency - Query will shift when ESUs are available for 2014\n| summarize Servers=count() by ESU", + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/ArgQueryChartTile", + "settings": {}, + "partHeader": { + "title": "SQL Server 2014 ESU License State", + "subtitle": "All SQL Server 2014 servers by ESU license state" + } + } + }, + "7": { + "position": { + "x": 0, + "y": 8, + "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": 2, + "isOptional": true + }, + { + "name": "queryScope", + "value": { + "scope": 0, + "values": [] + }, + "isOptional": true + }, + { + "name": "query", + "value": "//Windows 2012 Servers with no ESU license by Application\n//Applicaton breakdown requires tagging of resources\nResources\n| where type == \"microsoft.hybridcompute/machines\"\n| extend application = tostring(tags.Application)\n| extend osSku = tostring(properties.osSku)\n| extend esuLicense= tostring(properties.licenseProfile.esuProfile.licenseAssignmentState)\n//Change to Windows Server 2012 for live version\n| where osSku contains \"Windows Server 2012\"\n//Select Servers with no license\n| where esuLicense == \"NotAssigned\"\n| summarize ServerCount = count() by application", + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/ArgQueryChartTile", + "settings": {}, + "partHeader": { + "title": "Windows Server 2012 ESU not assigned by appllication", + "subtitle": "Windows Server 2012 servers with no ESU active by application" + } + } + }, + "8": { + "position": { + "x": 6, + "y": 8, + "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": "//Assigned ESU for SQL Query\n//This is a 3 part query - needs to include all VMs that have SQL Server installed as an instance (and to subselect for ESU eligible\n//SQL Server versions) and then all Machine extensions which contain the ESU assigned True/False flag\n//This query can then be used to determine ESU assignment by SQL Version, Edition, Tag (Application), Location etc\n//Main Table - All Arc Virtual Machines\nresources\n| where type == \"microsoft.hybridcompute/machines\"\n| extend mssqlDiscovered = properties.mssqlDiscovered\n//Performance - select only machines with SQL Server detected\n| where mssqlDiscovered == 'true'\n| extend coreCount = toint(properties.detectedProperties.coreCount)\n| extend machineId = tolower(tostring(id))\n| extend Machine_name = name\n| join kind=inner (\n //Sub Table - Select distinct SQL Server Version (and select on SQL Server 2012)\n resources\n | where type == 'microsoft.azurearcdata/sqlserverinstances'\n | extend version = tostring(properties.version)\n | extend edition = properties.edition\n | extend application = tostring(tags.Application)\n | extend containerId = tolower(tostring (properties.containerResourceId))\n //add clause back in for live dashboard\n | where version contains \"2012\"\n | where edition in (\"Enterprise\", \"Standard\")\n | where isnotempty(containerId)\n | extend SQL_instance = name\n //Machine may contain multiple instances - this distinct selects the first (assuming all instances on same machine are same SQL Version)\n | distinct containerId, application)\non $left.machineId == $right.containerId\n| join kind=inner (\n //Sub Table - Identify if SQL ESUs assigned\n resources\n //Machine extensions resource type\n | where type == \"microsoft.hybridcompute/machines/extensions\"\n //Machine has SQL Server extension\n | where properties.type in (\"WindowsAgent.SqlServer\",\"LinuxAgent.SqlServer\")\n //extract Machine name from ID\n | extend machineIdHasSQLServerExtensionInstalled = tolower(iff(id contains \"/extensions/WindowsAgent.SqlServer\" or id contains \"/extensions/LinuxAgent.SqlServer\", substring(id, 0, indexof(id, \"/extensions/\")), \"\"))\n //enableExtendedSecurityUpdates has 3 values - Null (ESU not applicable), True (ESU applicable and enabled), False (ESU applicable and disabled)\n | extend ESU = iff(notnull(properties.settings.enableExtendedSecurityUpdates), iff(properties.settings.enableExtendedSecurityUpdates == true,\"enabled\",\"disabled\"), \"N/A\")\n | project machineIdHasSQLServerExtensionInstalled, Extension_State = properties.provisioningState, License_Type = properties.settings.LicenseType,ESU, Extension_Version = properties.instanceView.typeHandlerVersion\n)\non $left.machineId == $right.machineIdHasSQLServerExtensionInstalled\n//| distinct Machine_name, ESU\n//| summarize count(), sum(coreCount) by ESU\n| summarize count() by application", + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/ArgQueryChartTile", + "settings": {}, + "partHeader": { + "title": "SQL Server 2012 ESU not assigned by appllication", + "subtitle": "SQL Server 2012 servers with no ESU active by application" + } + } + }, + "9": { + "position": { + "x": 12, + "y": 8, + "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": 2, + "isOptional": true + }, + { + "name": "queryScope", + "value": { + "scope": 0, + "values": [] + }, + "isOptional": true + }, + { + "name": "query", + "value": "resources\n| where type == \"microsoft.azurearcdata/sqlserverinstances\"\n// Change to SQL Server 2014\n| where tostring(properties['version']) == \"SQL Server 2014\"\n| extend application = tostring(tags.Application)\n//No ESU filter needed as no ESUs for 2014 yet\n| summarize Servers=count() by application", + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/ArgQueryChartTile", + "settings": {}, + "partHeader": { + "title": "SQL Server 2014 servers with no ESU active by application", + "subtitle": "SQL Server 2014 servers with no ESU active by application" + } + } + }, + "10": { + "position": { + "x": 0, + "y": 13, + "colSpan": 12, + "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'\r\n//Change to Windows Server 2012\r\n| extend osSku = tostring(properties.osSku)\r\n| where osSku contains \"Windows Server 2012\"\r\n| extend esuLicense= tostring(properties.licenseProfile.esuProfile.licenseAssignmentState)\r\n| join kind=inner (\r\n resourcecontainers\r\n | where type == 'microsoft.resources/subscriptions'\r\n | project subscriptionId, subScriptionName = name)\r\n on subscriptionId\r\n| project subScriptionName , resourceGroup, esuLicense\r\n| summarize ServerCount = count() by subScriptionName, resourceGroup, esuLicense", + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/ArgQueryGridTile", + "settings": {}, + "partHeader": { + "title": "Windows 2012 ESU Assignment by Subscription, Resource Group", + "subtitle": "Count of Windows Server 2012 servers assigned/not assigned" + } + } + }, + "11": { + "position": { + "x": 12, + "y": 13, + "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": 2, + "isOptional": true + }, + { + "name": "queryScope", + "value": { + "scope": 0, + "values": [] + }, + "isOptional": true + }, + { + "name": "query", + "value": "//Query - Chart of breakdown of Windows 2012 Servers into Datacenter and Standard\n//Filter on osTYpe = Windows \nresources\n| where type =~ 'microsoft.hybridcompute/machines'\n| where properties.osType == \"windows\"\n//**Change to Windows Server 2012\n| extend osSku = tostring(properties.osSku)\n| where osSku contains \"Windows Server 2012\"\n//Change back to original filter for go live - dummy filter below uses 2019/2022 to create 2 groups\n| extend edition = iff(properties.osSku contains \"Datacenter\", \"Datacenter\", \"Standard\")\n| summarize serverCount = count() by edition", + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/ArgQueryChartTile", + "settings": {}, + "partHeader": { + "title": "Windows Server 2012 Standard vs Datacenter", + "subtitle": "Distribution of Windows Server 2012 Standard & Datacenter servers" + } + } + }, + "12": { + "position": { + "x": 0, + "y": 18, + "colSpan": 18, + "rowSpan": 6 + }, + "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": 1, + "isOptional": true + }, + { + "name": "query", + "value": "//Summary Query – reports a count of servers onboarded to Arc by Subscription, Resource Group, returning if ESU is activated or not\nresources\n| where type =~ 'microsoft.hybridcompute/machines'\n| extend esuEligibility = tostring(properties.licenseProfile.esuProfile.esuEligibility)\n//Select where Server is Eligible for ESUs\n| where esuEligibility == \"Eligible\"\n| extend ESUAttached = iff(properties.licenseProfile.esuProfile.licenseAssignmentState ==\"Assigned\", 1, 0)\n| join kind=inner (\n resourcecontainers\n | where type == 'microsoft.resources/subscriptions'\n | project subscriptionId, subscriptionName = name)\n on subscriptionId\n| summarize percentESUAssigned = toint(\n round((todouble(sum(ESUAttached)) / count() * 100), 2)) by subscriptionName", + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/ArgQueryChartTile", + "settings": {}, + "partHeader": { + "title": "Percentage Windows Server ESU Assigned by Subscription", + "subtitle": "Percentage of WIndows Server ESUs of total ESU-eligible servers discovered" + } + } + }, + "13": { + "position": { + "x": 0, + "y": 24, + "colSpan": 12, + "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": "//Assigned ESU for SQL Query\r\n//This is a 3 part query - needs to include all VMs that have SQL Server installed as an instance (and to subselect for ESU eligible\r\n//SQL Server versions) and then all Machine extensions which contain the ESU assigned True/False flag\r\n//This query can then be used to determine ESU assignment by SQL Version, Edition, Tag (Application), Location etc\r\n//Main Table - All Arc Virtual Machines\r\nresources\r\n| where type == \"microsoft.hybridcompute/machines\"\r\n| extend mssqlDiscovered = properties.mssqlDiscovered\r\n//Performance - select only machines with SQL Server detected\r\n| where mssqlDiscovered == 'true'\r\n| extend coreCount = toint(properties.detectedProperties.coreCount)\r\n| extend machineId = tolower(tostring(id))\r\n| extend machineName = name\r\n//Include below if Subscription Name needed\r\n| join kind=inner (\r\n resourcecontainers\r\n | where type == 'microsoft.resources/subscriptions'\r\n | project subscriptionId, subscriptionName = name)\r\n on subscriptionId\r\n| join kind=inner (\r\n //Sub Table - Select distinct SQL Server Version (and select on SQL Server 2012)\r\n resources\r\n | where type == 'microsoft.azurearcdata/sqlserverinstances'\r\n | extend version = tostring(properties.version)\r\n | extend edition = properties.edition\r\n | extend containerId = tolower(tostring (properties.containerResourceId))\r\n //add clause back in for live dashboard\r\n | where version contains \"2012\"\r\n | where edition in (\"Enterprise\", \"Standard\")\r\n | where isnotempty(containerId)\r\n | extend SQL_instance = name\r\n //Machine may contain multiple instances - this distinct selects the first (assuming all instances on same machine are same SQL Version)\r\n | distinct containerId)\r\non $left.machineId == $right.containerId\r\n| join kind=inner (\r\n //Sub Table - Identify if SQL ESUs assigned\r\n resources\r\n //Machine extensions resource type\r\n | where type == \"microsoft.hybridcompute/machines/extensions\"\r\n //Machine has SQL Server extension\r\n | where properties.type in (\"WindowsAgent.SqlServer\",\"LinuxAgent.SqlServer\")\r\n //extract Machine name from ID\r\n | extend machineIdHasSQLServerExtensionInstalled = tolower(iff(id contains \"/extensions/WindowsAgent.SqlServer\" or id contains \"/extensions/LinuxAgent.SqlServer\", substring(id, 0, indexof(id, \"/extensions/\")), \"\"))\r\n //enableExtendedSecurityUpdates has 3 values - Null (ESU not applicable), True (ESU applicable and enabled), False (ESU applicable and disabled)\r\n | extend ESU = iff(notnull(properties.settings.enableExtendedSecurityUpdates), iff(properties.settings.enableExtendedSecurityUpdates == true,\"enabled\",\"disabled\"), \"N/A\")\r\n | project machineIdHasSQLServerExtensionInstalled, Extension_State = properties.provisioningState, License_Type = properties.settings.LicenseType,ESU, Extension_Version = properties.instanceView.typeHandlerVersion\r\n)\r\non $left.machineId == $right.machineIdHasSQLServerExtensionInstalled\r\n//| distinct Machine_name, ESU\r\n//| summarize count(), sum(coreCount) by ESU\r\n| summarize ServerCount = count() by subscriptionName, resourceGroup, ESU", + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/ArgQueryGridTile", + "settings": {}, + "partHeader": { + "title": "SQL Server 2012 ESU Assignment by Subscription, Resource Group", + "subtitle": "Count of SQL Server 2012 servers assigned/not assigned" + } + } + }, + "14": { + "position": { + "x": 12, + "y": 24, + "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": 2, + "isOptional": true + }, + { + "name": "queryScope", + "value": { + "scope": 0, + "values": [] + }, + "isOptional": true + }, + { + "name": "query", + "value": "//Query - Chart of breakdown of SQL 2012 Servers into Datacenter and Standard\n//Filter on version = SQL Server 2012 \nresources\n| where type == \"microsoft.azurearcdata/sqlserverinstances\"\n| extend version = tostring(properties.version)\n| extend edition = tostring(properties.edition)\n// Change to SQL Server 2012\n| where ['version'] == \"SQL Server 2012\"\n| summarize serverCount = count() by edition", + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/ArgQueryChartTile", + "settings": {}, + "partHeader": { + "title": "SQL Server 2012 Editions", + "subtitle": "Distribution of SQL Server 2012 Developer, Standard & Enterprise edition" + } + } + }, + "15": { + "position": { + "x": 0, + "y": 29, + "colSpan": 12, + "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.azurearcdata/sqlserverinstances\"\r\n// Change to SQL Server 2014\r\n//SQL Server Version & Edition\r\n| extend version = tostring(properties.version)\r\n| extend sqlEdition = tostring(properties.edition)\r\n| extend SQLinstance = name\r\n| where ['version'] == \"SQL Server 2014\"\r\n| join kind=inner (\r\n resourcecontainers\r\n | where type == 'microsoft.resources/subscriptions'\r\n | project subscriptionId, subScriptionName = name)\r\n on subscriptionId\r\n| project subScriptionName , resourceGroup\r\n| summarize instanceCount = count() by subScriptionName, resourceGroup", + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/ArgQueryGridTile", + "settings": {}, + "partHeader": { + "title": "SQL Server 2014 Distribution by Subscription, Resource Group", + "subtitle": "Distribution of SQL Server 2014 across all Arc registered servers" + } + } + }, + "16": { + "position": { + "x": 12, + "y": 29, + "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": 2, + "isOptional": true + }, + { + "name": "queryScope", + "value": { + "scope": 0, + "values": [] + }, + "isOptional": true + }, + { + "name": "query", + "value": "//Query - Chart of breakdown of SQL 2012 Servers into Datacenter and Standard\n//Filter on version = SQL Server 2012 \nresources\n| where type == \"microsoft.azurearcdata/sqlserverinstances\"\n| extend version = tostring(properties.version)\n| extend edition = tostring(properties.edition)\n// Change to SQL Server 2012\n| where ['version'] == \"SQL Server 2014\"\n| summarize serverCount = count() by edition", + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/ArgQueryChartTile", + "settings": {}, + "partHeader": { + "title": "SQL Server 2014 Editions", + "subtitle": "Distribution of SQL Server 2014 Developer, Standard & Enterprise edition" + } + } + } + } + } + }, + "metadata": { + "model": { + "timeRange": { + "value": { + "relative": { + "duration": 24, + "timeUnit": 1 + } + }, + "type": "MsPortalFx.Composition.Configuration.ValueTypes.TimeRange" + } + } + } + }, + "name": "Arc - ESU", + "type": "Microsoft.Portal/dashboards", + "location": "INSERT LOCATION", + "tags": { + "hidden-title": "Arc - ESU" + }, + "apiVersion": "2015-08-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 new file mode 100644 index 00000000..b6df9548 --- /dev/null +++ b/samples/features/azure-arc/dashboard/Arc - Estate Profile.json @@ -0,0 +1,1671 @@ +{ + "properties": { + "lenses": { + "0": { + "order": 0, + "parts": { + "0": { + "position": { + "x": 0, + "y": 0, + "colSpan": 24, + "rowSpan": 2 + }, + "metadata": { + "inputs": [], + "type": "Extension/HubsExtension/PartType/MarkdownPart", + "settings": { + "content": { + "content": "
\nAzure Arc - Estate Profile
\nThis dashboard shows an estate view of SQL Server, Windows Server and Linux servers.\n
", + "title": "", + "subtitle": "", + "markdownSource": 1, + "markdownUri": "" + } + } + } + }, + "1": { + "position": { + "x": 0, + "y": 2, + "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 Servers\nresources\n| where type =~ 'microsoft.hybridcompute/machines'\n| summarize ServerCount = count()", + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/ArgQuerySingleValueTile", + "settings": {}, + "partHeader": { + "title": "All Servers", + "subtitle": "Servers enabled by Azure Arc" + } + } + }, + "2": { + "position": { + "x": 2, + "y": 2, + "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": "//Standard VM Query - VM alone\n//Can be used in other queries, pulls out the most important properties for Arc VMs\n//Main Table - All Arc Virtual Machines\nresources\n//Arc registered VMs (Windows & linux)\n| where type == \"microsoft.hybridcompute/machines\"\n//Boolean - SQL installed (true/false)\n| extend mssqlDiscovered = properties.mssqlDiscovered\n//Machine Characteristics\n| extend coreCount = toint(properties.detectedProperties.coreCount)\n| extend logicalCoreCount = toint(properties.detectedProperties.logicalcoreCount)\n| extend processerNames = tostring(properties.detectedProperties.processorNames)\n| extend totalPhysicalMemory = toint(properties.detectedProperties.totalPhysicalMemoryInGigabytes)\n//Machine ID & Name\n| extend machineId = tolower(tostring(id))\n| extend machineName = name\n//Operating System\n| extend osSku = tostring(properties.osSku)\n| extend osName = tostring(properties.osName)\n| extend osVersion = tostring(properties.osVersion)\n//Windows or Linux\n| extend osType = tostring(properties.osType)\n| where osType == \"windows\"\n//OS Edition (Datacenter or Standard) \n| extend osEdition = iff(properties.osSku contains \"Datacenter\", \"Datacenter\", \"Standard\")\n//ESU Assignment (esu eligibility - OS is ESU capable, License Assignment State - OS does/does not have ESU assigned\n| extend ESU = properties.licenseProfile.esuProfile.licenseAssignmentState\n| extend esuEligibility = tostring(properties.licenseProfile.esuProfile.esuEligibility)\n//Type of ESU assigned (Standard/Data center)\n| extend serverType = tostring(properties.licenseProfile.esuProfile.serverType)\n| summarize windowsServerCount = count()", + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/ArgQuerySingleValueTile", + "settings": {}, + "partHeader": { + "title": "All Windows Servers", + "subtitle": "Windows Server enabled by Arc" + } + } + }, + "3": { + "position": { + "x": 4, + "y": 2, + "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": "//Standard VM Query - VM alone\n//Can be used in other queries, pulls out the most important properties for Arc VMs\n//Main Table - All Arc Virtual Machines\nresources\n//Arc registered VMs (Windows & linux)\n| where type == \"microsoft.hybridcompute/machines\"\n//Boolean - SQL installed (true/false)\n| extend mssqlDiscovered = properties.mssqlDiscovered\n//Machine Characteristics\n| extend coreCount = toint(properties.detectedProperties.coreCount)\n| extend logicalCoreCount = toint(properties.detectedProperties.logicalcoreCount)\n| extend processerNames = tostring(properties.detectedProperties.processorNames)\n| extend totalPhysicalMemory = toint(properties.detectedProperties.totalPhysicalMemoryInGigabytes)\n//Machine ID & Name\n| extend machineId = tolower(tostring(id))\n| extend machineName = name\n//Operating System\n| extend osSku = tostring(properties.osSku)\n| extend osName = tostring(properties.osName)\n| extend osVersion = tostring(properties.osVersion)\n//Windows or Linux\n| extend osType = tostring(properties.osType)\n| where osType == \"windows\"\n//OS Edition (Datacenter or Standard) \n| extend osEdition = iff(properties.osSku contains \"Datacenter\", \"Datacenter\", \"Standard\")\n//ESU Assignment (esu eligibility - OS is ESU capable, License Assignment State - OS does/does not have ESU assigned\n| extend ESU = properties.licenseProfile.esuProfile.licenseAssignmentState\n| extend esuEligibility = tostring(properties.licenseProfile.esuProfile.esuEligibility)\n//Type of ESU assigned (Standard/Data center)\n| extend serverType = tostring(properties.licenseProfile.esuProfile.serverType)\n| where osEdition == \"Datacenter\" \n| summarize windowsDCServerCount = count()", + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/ArgQuerySingleValueTile", + "settings": {}, + "partHeader": { + "title": "Windows Server Datacenter", + "subtitle": "Count of Datacenter Servers" + } + } + }, + "4": { + "position": { + "x": 6, + "y": 2, + "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": "//Standard VM Query - VM alone\n//Can be used in other queries, pulls out the most important properties for Arc VMs\n//Main Table - All Arc Virtual Machines\nresources\n//Arc registered VMs (Windows & linux)\n| where type == \"microsoft.hybridcompute/machines\"\n//Boolean - SQL installed (true/false)\n| extend mssqlDiscovered = properties.mssqlDiscovered\n//Machine Characteristics\n| extend coreCount = toint(properties.detectedProperties.coreCount)\n| extend logicalCoreCount = toint(properties.detectedProperties.logicalcoreCount)\n| extend processerNames = tostring(properties.detectedProperties.processorNames)\n| extend totalPhysicalMemory = toint(properties.detectedProperties.totalPhysicalMemoryInGigabytes)\n//Machine ID & Name\n| extend machineId = tolower(tostring(id))\n| extend machineName = name\n//Operating System\n| extend osSku = tostring(properties.osSku)\n| extend osName = tostring(properties.osName)\n| extend osVersion = tostring(properties.osVersion)\n//Windows or Linux\n| extend osType = tostring(properties.osType)\n| where osType == \"windows\"\n//OS Edition (Datacenter or Standard) \n| extend osEdition = iff(properties.osSku contains \"Datacenter\", \"Datacenter\", \"Standard\")\n//ESU Assignment (esu eligibility - OS is ESU capable, License Assignment State - OS does/does not have ESU assigned\n| extend ESU = properties.licenseProfile.esuProfile.licenseAssignmentState\n| extend esuEligibility = tostring(properties.licenseProfile.esuProfile.esuEligibility)\n//Type of ESU assigned (Standard/Data center)\n| extend serverType = tostring(properties.licenseProfile.esuProfile.serverType)\n| where osEdition == \"Standard\" \n| summarize windowsStdServerCount = count()", + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/ArgQuerySingleValueTile", + "settings": {}, + "partHeader": { + "title": "Windows Server Standard", + "subtitle": "Count of Standard Servers" + } + } + }, + "5": { + "position": { + "x": 8, + "y": 2, + "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": "//Standard VM Query - VM alone\n//Can be used in other queries, pulls out the most important properties for Arc VMs\n//Main Table - All Arc Virtual Machines\nresources\n//Arc registered VMs (Windows & linux)\n| where type == \"microsoft.hybridcompute/machines\"\n//Boolean - SQL installed (true/false)\n| extend mssqlDiscovered = properties.mssqlDiscovered\n| where mssqlDiscovered == \"true\"\n//Machine Characteristics\n| extend coreCount = toint(properties.detectedProperties.coreCount)\n| extend logicalCoreCount = toint(properties.detectedProperties.logicalcoreCount)\n| extend processerNames = tostring(properties.detectedProperties.processorNames)\n| extend totalPhysicalMemory = toint(properties.detectedProperties.totalPhysicalMemoryInGigabytes)\n//Machine ID & Name\n| extend machineId = tolower(tostring(id))\n| extend machineName = name\n//Operating System\n| extend osSku = tostring(properties.osSku)\n| extend osName = tostring(properties.osName)\n| extend osVersion = tostring(properties.osVersion)\n//Windows or Linux\n| extend osType = tostring(properties.osType)\n//OS Edition (Datacenter or Standard) \n| extend osEdition = iff(properties.osSku contains \"Datacenter\", \"Datacenter\", \"Standard\")\n//ESU Assignment (esu eligibility - OS is ESU capable, License Assignment State - OS does/does not have ESU assigned\n| extend ESU = properties.licenseProfile.esuProfile.licenseAssignmentState\n| extend esuEligibility = tostring(properties.licenseProfile.esuProfile.esuEligibility)\n//Type of ESU assigned (Standard/Data center)\n| extend serverType = tostring(properties.licenseProfile.esuProfile.serverType)\n| summarize SQLServerCount = count()", + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/ArgQuerySingleValueTile", + "settings": {}, + "partHeader": { + "title": "SQL Server servers", + "subtitle": "Count of servers running SQL Server" + } + } + }, + "6": { + "position": { + "x": 10, + "y": 2, + "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": "resources\n| where type == 'microsoft.azurearcdata/sqlserverinstances'\n| extend version = tostring(properties.version)\n| extend edition = properties.edition\n| extend containerId = tolower(tostring (properties.containerResourceId))\n//| where version contains \"2012\"\n//| where edition in (\"Enterprise\", \"Standard\")\n| extend SQL_instance = name\n//Machine may contain multiple instances - this distinct selects the first (assuming all instances on same machine are same SQL Version)\n| summarize SQLInstanceCount = count()", + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/ArgQuerySingleValueTile", + "settings": {}, + "partHeader": { + "title": "SQL Server Instances", + "subtitle": "Count of SQL Server instances" + } + } + }, + "7": { + "position": { + "x": 12, + "y": 2, + "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": "resources\n| where type == 'microsoft.azurearcdata/sqlserverinstances'\n| extend version = tostring(properties.version)\n| extend edition = properties.edition\n| extend containerId = tolower(tostring (properties.containerResourceId))\n//| where version contains \"2012\"\n| where edition in (\"Standard\")\n| extend SQL_instance = name\n//Machine may contain multiple instances - this distinct selects the first (assuming all instances on same machine are same SQL Version)\n| summarize SQLStdInstanceCount = count()", + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/ArgQuerySingleValueTile", + "settings": {}, + "partHeader": { + "title": "SQL Server Standard", + "subtitle": "Count of SQL Server Standard instances" + } + } + }, + "8": { + "position": { + "x": 14, + "y": 2, + "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": "resources\n| where type == 'microsoft.azurearcdata/sqlserverinstances'\n| extend version = tostring(properties.version)\n| extend edition = properties.edition\n| extend containerId = tolower(tostring (properties.containerResourceId))\n//| where version contains \"2012\"\n| where edition in (\"Enterprise\")\n| extend SQL_instance = name\n//Machine may contain multiple instances - this distinct selects the first (assuming all instances on same machine are same SQL Version)\n| summarize SQLEntInstanceCount = count()", + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/ArgQuerySingleValueTile", + "settings": {}, + "partHeader": { + "title": "SQL Server Enterprise", + "subtitle": "Count of Enterprise instances" + } + } + }, + "9": { + "position": { + "x": 16, + "y": 2, + "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": "//Standard VM Query - VM alone\n//Can be used in other queries, pulls out the most important properties for Arc VMs\n//Main Table - All Arc Virtual Machines\nresources\n//Arc registered VMs (Windows & linux)\n| where type == \"microsoft.hybridcompute/machines\"\n//Boolean - SQL installed (true/false)\n| extend mssqlDiscovered = properties.mssqlDiscovered\n//Machine Characteristics\n| extend coreCount = toint(properties.detectedProperties.coreCount)\n| extend logicalCoreCount = toint(properties.detectedProperties.logicalcoreCount)\n| extend processerNames = tostring(properties.detectedProperties.processorNames)\n| extend totalPhysicalMemory = toint(properties.detectedProperties.totalPhysicalMemoryInGigabytes)\n//Machine ID & Name\n| extend machineId = tolower(tostring(id))\n| extend machineName = name\n//Operating System\n| extend osSku = tostring(properties.osSku)\n| extend osName = tostring(properties.osName)\n| extend osVersion = tostring(properties.osVersion)\n//Windows or Linux\n| extend osType = tostring(properties.osType)\n| where osType == \"windows\"\n//OS Edition (Datacenter or Standard) \n| extend osEdition = iff(properties.osSku contains \"Datacenter\", \"Datacenter\", \"Standard\")\n//ESU Assignment (esu eligibility - OS is ESU capable, License Assignment State - OS does/does not have ESU assigned\n| extend ESU = properties.licenseProfile.esuProfile.licenseAssignmentState\n| extend esuEligibility = tostring(properties.licenseProfile.esuProfile.esuEligibility)\n//Type of ESU assigned (Standard/Data center)\n| extend serverType = tostring(properties.licenseProfile.esuProfile.serverType)\n| where osSku contains \"Windows Server 2012\" \n| summarize windowsServerCount = count()", + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/ArgQuerySingleValueTile", + "settings": {}, + "partHeader": { + "title": "Windows Server 2012", + "subtitle": "End of Life 10th October 2023" + } + } + }, + "10": { + "position": { + "x": 18, + "y": 2, + "colSpan": 3, + "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": "resources\n| where type == 'microsoft.azurearcdata/sqlserverinstances'\n| extend version = tostring(properties.version)\n| extend edition = properties.edition\n| extend containerId = tolower(tostring (properties.containerResourceId))\n| where version contains \"2012\"\n| where edition in (\"Enterprise\", \"Standard\")\n| extend SQL_instance = name\n//Machine may contain multiple instances - this distinct selects the first (assuming all instances on same machine are same SQL Version)\n| summarize SQL2012InstanceCount = count()", + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/ArgQuerySingleValueTile", + "settings": {}, + "partHeader": { + "title": "SQL Server 2012", + "subtitle": "End of Life 12th July 2022" + } + } + }, + "11": { + "position": { + "x": 21, + "y": 2, + "colSpan": 3, + "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": "resources\n| where type == 'microsoft.azurearcdata/sqlserverinstances'\n| extend version = tostring(properties.version)\n| extend edition = properties.edition\n| extend containerId = tolower(tostring (properties.containerResourceId))\n| where version contains \"2014\"\n| where edition in (\"Enterprise\", \"Standard\")\n| extend SQL_instance = name\n//Machine may contain multiple instances - this distinct selects the first (assuming all instances on same machine are same SQL Version)\n| summarize SQL2014InstanceCount = count()", + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/ArgQuerySingleValueTile", + "settings": {}, + "partHeader": { + "title": "SQL Server 2014", + "subtitle": "End of Life 9th July 2024" + } + } + }, + "12": { + "position": { + "x": 0, + "y": 5, + "colSpan": 24, + "rowSpan": 6 + }, + "metadata": { + "inputs": [ + { + "name": "isShared", + "isOptional": true + }, + { + "name": "queryId", + "isOptional": true + }, + { + "name": "formatResults", + "isOptional": true + }, + { + "name": "partTitle", + "value": "Query 2", + "isOptional": true + }, + { + "name": "queryScope", + "value": { + "scope": 0, + "values": [] + }, + "isOptional": true + }, + { + "name": "chartType", + "value": 1, + "isOptional": true + }, + { + "name": "query", + "value": "resources\n| where type =~ 'microsoft.hybridcompute/machines'\n| extend osSku = tostring(properties.osSku)\n| extend osType = tostring(properties.osType)\n| where osType == \"windows\"\n| extend shortOsSku = replace(\"Windows Server\",\"\", osSku)\n//| extend shortOsSku = osSku\n| summarize ServerCount = count() by shortOsSku\n| order by shortOsSku asc ", + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/ArgQueryChartTile", + "settings": {}, + "partHeader": { + "title": "Windows Server by OS", + "subtitle": "Windows Server by OS Version and Edition" + } + } + }, + "13": { + "position": { + "x": 0, + "y": 11, + "colSpan": 24, + "rowSpan": 6 + }, + "metadata": { + "inputs": [ + { + "name": "isShared", + "isOptional": true + }, + { + "name": "queryId", + "isOptional": true + }, + { + "name": "formatResults", + "isOptional": true + }, + { + "name": "partTitle", + "value": "Query 2", + "isOptional": true + }, + { + "name": "queryScope", + "value": { + "scope": 0, + "values": [] + }, + "isOptional": true + }, + { + "name": "chartType", + "value": 1, + "isOptional": true + }, + { + "name": "query", + "value": "resources\n| where type =~ 'microsoft.hybridcompute/machines'\n| extend osSku = tostring(properties.osSku)\n| extend osType = tostring(properties.osType)\n| where osType == \"linux\"\n| project osSku\n| summarize ServerCount = count() by osSku\n| order by osSku asc ", + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/ArgQueryChartTile", + "settings": {}, + "partHeader": { + "title": "Linix Servers by OS", + "subtitle": "Linux servers by OS Version" + } + } + }, + "14": { + "position": { + "x": 0, + "y": 17, + "colSpan": 9, + "rowSpan": 6 + }, + "metadata": { + "inputs": [ + { + "name": "isShared", + "isOptional": true + }, + { + "name": "queryId", + "isOptional": true + }, + { + "name": "formatResults", + "isOptional": true + }, + { + "name": "queryScope", + "value": { + "scope": 0, + "values": [] + }, + "isOptional": true + }, + { + "name": "partTitle", + "value": "Query 1", + "isOptional": true + }, + { + "name": "chartType", + "value": 2, + "isOptional": true + }, + { + "name": "query", + "value": "resources\r\n| where type == \"microsoft.hybridcompute/machines\"\r\n| extend coreCount = toint(properties.detectedProperties.coreCount)\r\n| extend osSku = tostring(properties.osSku)\r\n| extend osName = tostring(properties.osName)\r\n| extend osType = tostring(properties.osType)\r\n| extend Machine_name = name\r\n| where osType == \"windows\"\r\n| summarize TotalCores = sum(coreCount) by osSku\r\n|order by TotalCores desc", + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/ArgQueryChartTile", + "settings": {}, + "partHeader": { + "title": "Cores by Windows OS", + "subtitle": "Total cores for Windows Server by OS Version" + } + } + }, + "15": { + "position": { + "x": 9, + "y": 17, + "colSpan": 9, + "rowSpan": 6 + }, + "metadata": { + "inputs": [ + { + "name": "partTitle", + "value": "Query 1", + "isOptional": true + }, + { + "name": "chartType", + "value": 2, + "isOptional": true + }, + { + "name": "isShared", + "isOptional": true + }, + { + "name": "queryId", + "isOptional": true + }, + { + "name": "formatResults", + "isOptional": true + }, + { + "name": "queryScope", + "value": { + "scope": 0, + "values": [] + }, + "isOptional": true + }, + { + "name": "query", + "value": "resources\r\n| where type == \"microsoft.hybridcompute/machines\"\r\n| extend coreCount = toint(properties.detectedProperties.coreCount)\r\n| extend osSku = tostring(properties.osSku)\r\n| extend osName = tostring(properties.osName)\r\n| extend osType = tostring(properties.osType)\r\n| extend Machine_name = name\r\n| where osType == \"linux\"\r\n| summarize TotalCores = sum(coreCount) by osSku\r\n|order by TotalCores desc", + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/ArgQueryChartTile", + "settings": { + "content": {} + }, + "partHeader": { + "title": "Cores by Linux OS", + "subtitle": "Cores per Linux OS version" + } + } + }, + "16": { + "position": { + "x": 18, + "y": 17, + "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": 2, + "isOptional": true + }, + { + "name": "queryScope", + "value": { + "scope": 0, + "values": [] + }, + "isOptional": true + }, + { + "name": "query", + "value": "resources\n| where type == \"microsoft.hybridcompute/machines\"\n| extend osType = tostring(properties.osType)\n| summarize ServerCount = count() by osType", + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/ArgQueryChartTile", + "settings": {}, + "partHeader": { + "title": "OS Type", + "subtitle": "Operating System type" + } + } + }, + "17": { + "position": { + "x": 0, + "y": 23, + "colSpan": 13, + "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": "resources\r\n| where type == 'microsoft.hybridcompute/machines'\r\n| extend osSKu = tostring(properties.osSku)\r\n| extend mssqlDiscovered = properties.mssqlDiscovered\r\n| join kind=inner (\r\n resourcecontainers\r\n | where type == 'microsoft.resources/subscriptions'\r\n | project subscriptionId, subScriptionName = name)\r\n on subscriptionId\r\n| extend SQLFound = iff(mssqlDiscovered == \"True\",1,0)\r\n| summarize ServerCount = count(), SQLServerCount = sum(SQLFound) by subScriptionName, resourceGroup, osSKu\r\n| order by subScriptionName asc , resourceGroup asc,osSKu asc ", + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/ArgQueryGridTile", + "settings": {}, + "partHeader": { + "title": "Servers per Subscription, Resource Group", + "subtitle": "Servers across all subscriptions, resource groups" + } + } + }, + "18": { + "position": { + "x": 13, + "y": 23, + "colSpan": 3, + "rowSpan": 3 + }, + "metadata": { + "inputs": [ + { + "name": "partTitle", + "value": "Query 1", + "isOptional": true + }, + { + "name": "chartType", + "isOptional": true + }, + { + "name": "isShared", + "isOptional": true + }, + { + "name": "queryId", + "isOptional": true + }, + { + "name": "formatResults", + "isOptional": true + }, + { + "name": "queryScope", + "value": { + "scope": 0, + "values": [] + }, + "isOptional": true + }, + { + "name": "query", + "value": "resources\n| where type == \"microsoft.hybridcompute/machines\"\n| where properties.osName == \"windows\"\n| extend Cores = toint(properties.detectedProperties.logicalCoreCount)\n| extend Application = tostring(tags.Division)\n| extend Location = tostring(tags.Type)\n| extend TotalPhysicalMemory = toint(properties.detectedProperties.totalPhysicalMemoryInGigabytes)\n| extend osSku = tostring(properties.osSku)\n| extend os_Name = properties.osname \n| extend osType = properties.osType\n| extend osVersion = tostring(properties.osVersion)\n| extend ESU = properties.licenseProfile.esuProfile.licenseAssignmentState\n| project Name=name, ESU, Application, Location, os_Name, osType, Cores, TotalPhysicalMemory, osVersion, osSku\n| distinct osSku\n| summarize DistinctosSKuCount = count() ", + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/ArgQuerySingleValueTile", + "settings": { + "content": {} + }, + "partHeader": { + "title": "Distinct Windows OS SKUs", + "subtitle": "Count of distinct Wndows OS SKUs deployed" + } + } + }, + "19": { + "position": { + "x": 16, + "y": 23, + "colSpan": 8, + "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": "query", + "value": "resources\r\n| where type == \"microsoft.hybridcompute/machines\"\r\n| where properties.osName == \"windows\"\r\n| extend Cores = toint(properties.detectedProperties.logicalCoreCount)\r\n| extend Application = tostring(tags.Division)\r\n| extend Location = tostring(tags.Type)\r\n| extend TotalPhysicalMemory = toint(properties.detectedProperties.totalPhysicalMemoryInGigabytes)\r\n| extend osSku = tostring(properties.osSku)\r\n| extend os_Name = properties.osname \r\n| extend osType = properties.osType\r\n| extend osVersion = tostring(properties.osVersion)\r\n| extend ESU = properties.licenseProfile.esuProfile.licenseAssignmentState\r\n| project Name=name, ESU, Application, Location, os_Name, osType, Cores, TotalPhysicalMemory, osVersion, osSku\r\n| summarize ServerCount = count() by osSku, osVersion\r\n| order by osSku asc ", + "isOptional": true + }, + { + "name": "queryScope", + "value": { + "scope": 0, + "values": [] + }, + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/ArgQueryGridTile", + "settings": {}, + "partHeader": { + "title": "OS Version by Windows OS SKU", + "subtitle": "Breakdown of Windows OS versions and OS SKUs" + } + } + }, + "20": { + "position": { + "x": 13, + "y": 26, + "colSpan": 3, + "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": "resources\n| where type == \"microsoft.hybridcompute/machines\"\n| where properties.osName == \"windows\"\n| extend Cores = toint(properties.detectedProperties.logicalCoreCount)\n| extend Application = tostring(tags.Division)\n| extend Location = tostring(tags.Type)\n| extend TotalPhysicalMemory = toint(properties.detectedProperties.totalPhysicalMemoryInGigabytes)\n| extend osSku = tostring(properties.osSku)\n| extend os_Name = properties.osname \n| extend osType = properties.osType\n| extend osVersion = tostring(properties.osVersion)\n| extend ESU = properties.licenseProfile.esuProfile.licenseAssignmentState\n| project Name=name, ESU, Application, Location, os_Name, osType, Cores, TotalPhysicalMemory, osVersion, osSku\n| distinct osVersion\n| summarize DistinctVersionCount = count() ", + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/ArgQuerySingleValueTile", + "settings": {}, + "partHeader": { + "title": "Distinct WIndows OS Versions", + "subtitle": "Count of distinct Windows OS versions deployed" + } + } + }, + "21": { + "position": { + "x": 0, + "y": 29, + "colSpan": 24, + "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": 1, + "isOptional": true + }, + { + "name": "query", + "value": "resources\n| where type == \"microsoft.hybridcompute/machines\"\n| where properties.osName == \"windows\"\n| extend Cores = toint(properties.detectedProperties.logicalCoreCount)\n| extend Application = tostring(tags.Division)\n| extend Location = tostring(tags.Type)\n| extend TotalPhysicalMemory = toint(properties.detectedProperties.totalPhysicalMemoryInGigabytes)\n| extend osSku = tostring(properties.osSku)\n| extend os_Name = properties.osname \n| extend osType = properties.osType\n| extend osVersion = tostring(properties.osVersion)\n| extend ESU = properties.licenseProfile.esuProfile.licenseAssignmentState\n| project Name=name, ESU, Application, Location, os_Name, osType, Cores, TotalPhysicalMemory, osVersion, osSku\n| extend shortOsSku = replace(\"Windows Server\",\"\", osSku)\n| summarize ServerCount = count() by shortOsSku, osVersion\n//Count distinct OS Versions for each OS SKU\n| summarize osVersionCount = count() by shortOsSku\n| order by shortOsSku asc ", + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/ArgQueryChartTile", + "settings": {}, + "partHeader": { + "title": "Windows OS Versions per OS SKU", + "subtitle": "Distinct OS versions per Windows OS SKU" + } + } + }, + "22": { + "position": { + "x": 0, + "y": 34, + "colSpan": 24, + "rowSpan": 5 + }, + "metadata": { + "inputs": [ + { + "name": "isShared", + "isOptional": true + }, + { + "name": "queryId", + "isOptional": true + }, + { + "name": "formatResults", + "isOptional": true + }, + { + "name": "partTitle", + "value": "Query 2", + "isOptional": true + }, + { + "name": "queryScope", + "value": { + "scope": 0, + "values": [] + }, + "isOptional": true + }, + { + "name": "chartType", + "value": 1, + "isOptional": true + }, + { + "name": "query", + "value": "resources\n| where type == \"microsoft.azurearcdata/sqlserverinstances\"\n| extend SQLVersion = tostring(properties['version'])\n| summarize Count=count() by SQLVersion\n| order by SQLVersion asc", + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/ArgQueryChartTile", + "settings": {}, + "partHeader": { + "title": "SQL Server Instances by SQL Version", + "subtitle": "SQL Server instance count by version" + } + } + }, + "23": { + "position": { + "x": 0, + "y": 39, + "colSpan": 24, + "rowSpan": 1 + }, + "metadata": { + "inputs": [], + "type": "Extension/HubsExtension/PartType/MarkdownPart", + "settings": { + "content": { + "content": "Server Distribution by Tag Values - \nShows server distribution by various tag values.\n", + "title": "", + "subtitle": "", + "markdownSource": 1, + "markdownUri": "" + } + } + } + }, + "24": { + "position": { + "x": 0, + "y": 40, + "colSpan": 24, + "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.hybridcompute/machines\"\n//Tag value - edit here for alternative tags\n| extend application = tostring(tags.Application)\n| summarize ServerCount = count() by application\n| order by application asc", + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/ArgQueryChartTile", + "settings": {}, + "partHeader": { + "title": "Server Distribution by Application", + "subtitle": "All Servers by Application tag value" + } + } + }, + "25": { + "position": { + "x": 0, + "y": 46, + "colSpan": 24, + "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.hybridcompute/machines\"\n//Tag value - edit here for alternative tags\n| extend dataCenter = tostring(tags.DataCenter)\n| summarize ServerCount = count() by dataCenter\n| order by dataCenter asc", + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/ArgQueryChartTile", + "settings": {}, + "partHeader": { + "title": "Server Distribution by Data Center", + "subtitle": "All Servers by Data Center tag value" + } + } + }, + "26": { + "position": { + "x": 0, + "y": 52, + "colSpan": 25, + "rowSpan": 7 + }, + "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.hybridcompute/machines\"\n//Tag value - edit here for alternative tags\n| extend businessUnit = tostring(tags.BusinessUnit)\n| summarize ServerCount = count() by businessUnit\n| order by businessUnit asc", + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/ArgQueryChartTile", + "settings": {}, + "partHeader": { + "title": "Server Distribution by Business Unit", + "subtitle": "All Servers by Business Unir tag value" + } + } + }, + "27": { + "position": { + "x": 0, + "y": 59, + "colSpan": 13, + "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.hybridcompute/machines\"\n//Tag value - edit here for alternative tags\n| extend location = tostring(tags.Location)\n| summarize ServerCount = count() by location\n| order by location asc", + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/ArgQueryChartTile", + "settings": {}, + "partHeader": { + "title": "Server Distribution by Location", + "subtitle": "All Servers by Location tag value" + } + } + }, + "28": { + "position": { + "x": 13, + "y": 59, + "colSpan": 12, + "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.hybridcompute/machines\"\n| where properties.detectedProperties.mssqldiscovered == \"true\"\n//Tag values\n| extend application = tostring(tags.Application)\n| extend location = tostring(tags.Location)\n//Operating System\n| extend osSku = tostring(properties.osSku)\n| extend osName = tostring(properties.osName)\n| extend osVersion = tostring(properties.osVersion)\n| summarize ServerCount = count() by location\n| order by location asc", + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/ArgQueryChartTile", + "settings": {}, + "partHeader": { + "title": "SQL Server Distribution by Location", + "subtitle": "Count of SQL Servers discovered for each Location" + } + } + }, + "29": { + "position": { + "x": 0, + "y": 65, + "colSpan": 25, + "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.hybridcompute/machines\"\n| where properties.detectedProperties.mssqldiscovered == \"true\"\n//Tag values\n| extend application = tostring(tags.Application)\n| extend location = tostring(tags.Location)\n//Operating System\n| extend osSku = tostring(properties.osSku)\n| extend osName = tostring(properties.osName)\n| extend osVersion = tostring(properties.osVersion)\n| summarize ServerCount = count() by application\n| order by application asc", + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/ArgQueryChartTile", + "settings": {}, + "partHeader": { + "title": "SQL Server Distribution by Application", + "subtitle": "Count of SQL Servers discovered for each Application" + } + } + }, + "30": { + "position": { + "x": 0, + "y": 71, + "colSpan": 25, + "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.hybridcompute/machines\"\n| where properties.detectedProperties.mssqldiscovered == \"true\"\n//Tag values\n| extend application = tostring(tags.Application)\n| extend location = tostring(tags.Location)\n| extend businessUnit = tostring(tags.BusinessUnit)\n//Operating System\n| extend osSku = tostring(properties.osSku)\n| extend osName = tostring(properties.osName)\n| extend osVersion = tostring(properties.osVersion)\n| summarize ServerCount = count() by businessUnit\n| order by businessUnit asc", + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/ArgQueryChartTile", + "settings": {}, + "partHeader": { + "title": "SQL Server Distribution by Business Unit", + "subtitle": "Count of SQL Servers discovered for each Business Unit" + } + } + }, + "31": { + "position": { + "x": 0, + "y": 77, + "colSpan": 25, + "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.hybridcompute/machines\"\n| where properties.detectedProperties.mssqldiscovered == \"true\"\n//Tag values\n| extend application = tostring(tags.Application)\n| extend location = tostring(tags.Location)\n| extend businessUnit = tostring(tags.BusinessUnit)\n| extend dataCenter = tostring(tags.DataCenter)\n//Operating System\n| extend osSku = tostring(properties.osSku)\n| extend osName = tostring(properties.osName)\n| extend osVersion = tostring(properties.osVersion)\n| summarize ServerCount = count() by dataCenter\n| order by dataCenter asc", + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/ArgQueryChartTile", + "settings": {}, + "partHeader": { + "title": "SQL Server Distibution by Data Center", + "subtitle": "Count of SQL Servers discovered for each Data Center" + } + } + } + } + } + }, + "metadata": { + "model": { + "timeRange": { + "value": { + "relative": { + "duration": 24, + "timeUnit": 1 + } + }, + "type": "MsPortalFx.Composition.Configuration.ValueTypes.TimeRange" + }, + "filterLocale": { + "value": "en-us" + }, + "filters": { + "value": { + "MsPortalFx_TimeRange": { + "model": { + "format": "utc", + "granularity": "auto", + "relative": "24h" + }, + "displayCache": { + "name": "UTC Time", + "value": "Past 24 hours" + }, + "filteredPartIds": [] + } + } + } + } + } + }, + "name": "Arc - Estate Profile", + "type": "Microsoft.Portal/dashboards", + "location": "INSERT LOCATION", + "tags": { + "hidden-title": "Arc - Estate Profile" + }, + "apiVersion": "2015-08-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 new file mode 100644 index 00000000..7327ab7d --- /dev/null +++ b/samples/features/azure-arc/dashboard/Arc - SQL Server Inventory.json @@ -0,0 +1,872 @@ +{ + "properties": { + "lenses": { + "0": { + "order": 0, + "parts": { + "0": { + "position": { + "x": 0, + "y": 0, + "colSpan": 20, + "rowSpan": 2 + }, + "metadata": { + "inputs": [], + "type": "Extension/HubsExtension/PartType/MarkdownPart", + "settings": { + "content": { + "content": "
\nArc - SQL Server Inventory\n
\nThis dashboard provides insights into the entire SQL Server estate enabled by Azure Arc.\n
", + "title": "", + "subtitle": "", + "markdownSource": 1, + "markdownUri": "" + } + } + } + }, + "1": { + "position": { + "x": 0, + "y": 2, + "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": "SQL Server Instances", + "subtitle": "Count of SQL Server Instances" + } + } + }, + "2": { + "position": { + "x": 3, + "y": 2, + "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": "SQL Server Databases", + "subtitle": "Count of databases across all SQL Server instances" + } + } + }, + "3": { + "position": { + "x": 6, + "y": 2, + "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 SizeMB desc \r\n| take 20", + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/ArgQueryGridTile", + "settings": {}, + "partHeader": { + "title": "DB Details per SQL Server Instance", + "subtitle": "Number of DBs and size per SQL Server instance" + } + } + }, + "4": { + "position": { + "x": 0, + "y": 6, + "colSpan": 20, + "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\"\n| extend version = tostring(properties['version'])\n| summarize Count=count() by ['version']\n| order by ['version'] asc ", + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/ArgQueryChartTile", + "settings": {}, + "partHeader": { + "title": "SQL Server Versions", + "subtitle": "Count of SQL Server instances by version" + } + } + }, + "5": { + "position": { + "x": 0, + "y": 11, + "colSpan": 20, + "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.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": "Instances per SQL Server Edition", + "subtitle": "Count of SQL Server instances per edition" + } + } + }, + "6": { + "position": { + "x": 0, + "y": 16, + "colSpan": 20, + "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.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 Level", + "subtitle": "Count of databases by compatibilty level" + } + } + }, + "7": { + "position": { + "x": 0, + "y": 21, + "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": "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 + }, + { + "name": "chartType", + "value": 2, + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/ArgQueryChartTile", + "settings": {}, + "partHeader": { + "title": "Defender for SQL Server", + "subtitle": "Count of SQL Server servers by Defender protection status" + } + } + }, + "8": { + "position": { + "x": 6, + "y": 21, + "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": "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 + }, + { + "name": "chartType", + "value": 2, + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/ArgQueryChartTile", + "settings": {}, + "partHeader": { + "title": "Encrypted Databases", + "subtitle": "Count of databases encrypted and not encrypted" + } + } + }, + "9": { + "position": { + "x": 12, + "y": 21, + "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": "queryScope", + "value": { + "scope": 0, + "values": [] + }, + "isOptional": true + }, + { + "name": "query", + "value": " resources\n | where type == 'microsoft.azurearcdata/sqlserverinstances'\n | extend version = tostring(properties.version)\n | extend edition = properties.edition\n | extend containerId = tolower(tostring (properties.containerResourceId))\n //add clause back in for live dashboard\n | extend serverClass = iff(edition in (\"Enterprise\", \"Standard\"), \"Ent/Std\", \"Express/Dev etc\") \n| summarize count() by serverClass", + "isOptional": true + }, + { + "name": "chartType", + "value": 2, + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/ArgQueryChartTile", + "settings": {}, + "partHeader": { + "title": "SQL Server Edition Type", + "subtitle": "Standard or Enterprise Edition vs other SQL Server Editions" + } + } + }, + "10": { + "position": { + "x": 0, + "y": 27, + "colSpan": 12, + "rowSpan": 7 + }, + "metadata": { + "inputs": [ + { + "name": "partTitle", + "value": "Query 1", + "isOptional": true + }, + { + "name": "query", + "value": "resources\r\n| where type == \"microsoft.azurearcdata/sqlserverinstances\"\r\n| extend d=parse_json(properties) \r\n| extend Patch=d[\"patchLevel\"]\r\n| extend SQLVersion=d[\"version\"]\r\n| extend Edition=d[\"edition\"]\r\n| extend License=d[\"licenseType\"]\r\n| project name, Patch, SQLVersion, Edition, License\r\n| summarize count() by tostring(License), tostring(Edition)", + "isOptional": true + }, + { + "name": "chartType", + "isOptional": true + }, + { + "name": "isShared", + "isOptional": true + }, + { + "name": "queryId", + "value": "", + "isOptional": true + }, + { + "name": "formatResults", + "isOptional": true + }, + { + "name": "queryScope", + "value": { + "scope": 0, + "values": [] + }, + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/ArgQueryGridTile", + "settings": {}, + "partHeader": { + "title": "SQL Server Edition Summary", + "subtitle": "Count of SQL Server instances by **instsance** license type and edition" + } + } + }, + "11": { + "position": { + "x": 12, + "y": 27, + "colSpan": 8, + "rowSpan": 7 + }, + "metadata": { + "inputs": [ + { + "name": "partTitle", + "value": "Query 1", + "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| summarize count() by tostring(properties.settings.LicenseType)", + "isOptional": true + }, + { + "name": "chartType", + "value": 2, + "isOptional": true + }, + { + "name": "isShared", + "isOptional": true + }, + { + "name": "queryId", + "value": "", + "isOptional": true + }, + { + "name": "formatResults", + "isOptional": true + }, + { + "name": "queryScope", + "value": { + "scope": 0, + "values": [] + }, + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/ArgQueryChartTile", + "settings": {}, + "partHeader": { + "title": "Extension License Type", + "subtitle": "Count of SQL Server servers by extension license type" + } + } + }, + "12": { + "position": { + "x": 0, + "y": 34, + "colSpan": 20, + "rowSpan": 1 + }, + "metadata": { + "inputs": [], + "type": "Extension/HubsExtension/PartType/MarkdownPart", + "settings": { + "content": { + "content": "SQL Server Instances by Tag Values - \nShows SQL Server instance distribution by various tag values.\n\n", + "title": "", + "subtitle": "", + "markdownSource": 1, + "markdownUri": "" + } + } + } + }, + "13": { + "position": { + "x": 0, + "y": 35, + "colSpan": 20, + "rowSpan": 7 + }, + "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\"\n//Tag values - edit here for custom tags\n| extend application = tostring(tags.Application)\n| summarize ServerCount = count() by application", + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/ArgQueryChartTile", + "settings": {}, + "partHeader": { + "title": "SQL Server Instances by Application", + "subtitle": "SQL Servers instances by \"Application\" tag values" + } + } + }, + "14": { + "position": { + "x": 0, + "y": 42, + "colSpan": 20, + "rowSpan": 7 + }, + "metadata": { + "inputs": [ + { + "name": "partTitle", + "value": "Query 1", + "isOptional": true + }, + { + "name": "chartType", + "value": 1, + "isOptional": true + }, + { + "name": "isShared", + "isOptional": true + }, + { + "name": "queryId", + "isOptional": true + }, + { + "name": "formatResults", + "isOptional": true + }, + { + "name": "queryScope", + "value": { + "scope": 0, + "values": [] + }, + "isOptional": true + }, + { + "name": "query", + "value": "resources\n| where ['type'] == \"microsoft.azurearcdata/sqlserverinstances\"\n//Tag values - edit here for custom tags\n| extend location = tostring(tags.Location)\n| summarize ServerCount = count() by location", + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/ArgQueryChartTile", + "settings": { + "content": {} + }, + "partHeader": { + "title": "SQL Server Instances by Location", + "subtitle": "SQL Servers instasnces by \"Location\" tag values" + } + } + }, + "15": { + "position": { + "x": 0, + "y": 49, + "colSpan": 20, + "rowSpan": 7 + }, + "metadata": { + "inputs": [ + { + "name": "partTitle", + "value": "Query 1", + "isOptional": true + }, + { + "name": "chartType", + "value": 1, + "isOptional": true + }, + { + "name": "isShared", + "isOptional": true + }, + { + "name": "queryId", + "isOptional": true + }, + { + "name": "formatResults", + "isOptional": true + }, + { + "name": "queryScope", + "value": { + "scope": 0, + "values": [] + }, + "isOptional": true + }, + { + "name": "query", + "value": "resources\n| where ['type'] == \"microsoft.azurearcdata/sqlserverinstances\"\n//Tag values - edit here for custom tags\n| extend dataCenter = tostring(tags.DataCenter)\n| summarize ServerCount = count() by dataCenter", + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/ArgQueryChartTile", + "settings": { + "content": {} + }, + "partHeader": { + "title": "SQL Server Instasnces by Data Center", + "subtitle": "SQL Servers insetasnces by \"Datacenter\" tag values." + } + } + }, + "16": { + "position": { + "x": 0, + "y": 56, + "colSpan": 20, + "rowSpan": 7 + }, + "metadata": { + "inputs": [ + { + "name": "partTitle", + "value": "Query 1", + "isOptional": true + }, + { + "name": "chartType", + "value": 1, + "isOptional": true + }, + { + "name": "isShared", + "isOptional": true + }, + { + "name": "queryId", + "isOptional": true + }, + { + "name": "formatResults", + "isOptional": true + }, + { + "name": "queryScope", + "value": { + "scope": 0, + "values": [] + }, + "isOptional": true + }, + { + "name": "query", + "value": "resources\n| where ['type'] == \"microsoft.azurearcdata/sqlserverinstances\"\n//Tag values - edit here for custom tags\n| extend businessUnit = tostring(tags.BusinessUnit)\n| summarize ServerCount = count() by businessUnit", + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/ArgQueryChartTile", + "settings": { + "content": {} + }, + "partHeader": { + "title": "SQL Server Instances by Business Unit", + "subtitle": "SQL Server instances by \"BusinessUnit\" tag values" + } + } + } + } + } + }, + "metadata": { + "model": { + "timeRange": { + "value": { + "relative": { + "duration": 24, + "timeUnit": 1 + } + }, + "type": "MsPortalFx.Composition.Configuration.ValueTypes.TimeRange" + } + } + } + }, + "name": "Arc - SQL Server Inventory", + "type": "Microsoft.Portal/dashboards", + "location": "INSERT LOCATION", + "tags": { + "hidden-title": "Arc - SQL Server Inventory" + }, + "apiVersion": "2015-08-01-preview" +} \ No newline at end of file diff --git a/samples/features/azure-arc/dashboard/README.md b/samples/features/azure-arc/dashboard/README.md index fac2d7e3..0f7cc176 100644 --- a/samples/features/azure-arc/dashboard/README.md +++ b/samples/features/azure-arc/dashboard/README.md @@ -1,7 +1,7 @@ ![](../media/solutions-microsoft-logo-small.png) # How to Enable Azure Dashboard for ARC SQL -This article will show you how to use the [SQL Server Instances.json](SQL%20Server%20Instances.json) file to create a custom dashboard in the [Azure portal](https://learn.microsoft.com/en-us/azure/azure-portal/azure-portal-dashboards). +This article will show you how to use the dashboard .json files in this directory to create custom dashboards in the [Azure portal](https://learn.microsoft.com/en-us/azure/azure-portal/azure-portal-dashboards). ![](./img/Dashboard.png) @@ -14,7 +14,17 @@ This article will show you how to use the [SQL Server Instances.json](SQL%20Serv ![](https://learn.microsoft.com/en-us/azure/azure-portal/media/azure-portal-dashboards/create-new-dashboard.png) 4. If you want to edit the dashboard, please refer to this [link](https://learn.microsoft.com/en-us/azure/azure-portal/azure-portal-dashboards#edit-a-dashboard). - +# Dashboard Directory + - **Arc - Deployment Progress:** A dashbaord showing the progress of deploying Azure Arc to enable your SQL Server, Windows Server, and Linux servers. + - **Arc - ESU:** A dashboard showing the current licensing configuration for Extended Security Updates (ESU) for SQL Server and Windows Server. + - **Arc - Estate Profile:** A dashboard showing summary and detailed view of SQL Server, Windows Server, and Linux servers enabled by Azure Arc. + - **Arc - SQL Server Inventory:** A dashboard showing detailed stats about SQL Server instances and servers hosting SQL Server. + - **SQL Server Instances:** A dashboard focused on SQL Server inventory details about SQL Server instances and databases. +# Acknowledgements +Many thanks to the following contributors that provided content to this part of the SQL Server samples repository. +- [Tps99](https://github.com/tps99) + + ## Disclaimers -The code included in this sample is not intended to be a set of best practices on how to build scalable enterprise grade applications. This is beyond the scope of this quick start sample. +The code included in these samples are not intended to be a set of best practices on how to build scalable enterprise grade applications. This is beyond the scope of this quick start sample.