Files
sql-server-samples/samples/features/azure-arc/dashboard/Arc-enabled SQL Server Health.json
T

716 lines
35 KiB
JSON

{
"properties": {
"lenses": [
{
"order": 0,
"parts": [
{
"position": {
"x": 0,
"y": 0,
"colSpan": 6,
"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.hybridcompute/machines\"\n| where properties.detectedProperties.mssqldiscovered =~ 'true' or properties.mssqldiscovered =~ 'true'\n| summarize SqlServerMachines = count()",
"isOptional": true
}
],
"type": "Extension/HubsExtension/PartType/ArgQuerySingleValueTile",
"settings": {},
"partHeader": {
"title": "Machines Hosting SQL Server",
"subtitle": "The count of machines that have SQL Server installed"
}
}
},
{
"position": {
"x": 6,
"y": 0,
"colSpan": 6,
"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.hybridcompute/machines/extensions\" \n| where properties.type in (\"WindowsAgent.SqlServer\", \"LinuxAgent.SqlServer\")\n| summarize SQLServerExtensions = count()",
"isOptional": true
},
{
"name": "queryScope",
"value": {
"scope": 0,
"values": []
},
"isOptional": true
}
],
"type": "Extension/HubsExtension/PartType/ArgQuerySingleValueTile",
"settings": {},
"partHeader": {
"title": "SQL Server Extensions",
"subtitle": "The count of SQL Server extensions. Should be the same as the count of Machines Hosting SQL Server."
}
}
},
{
"position": {
"x": 12,
"y": 0,
"colSpan": 6,
"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.hybridcompute/machines/extensions\"\n| where properties.type in (\"WindowsAgent.SqlServer\", \"LinuxAgent.SqlServer\")\n| extend targetMachineName = tolower(tostring(split(id, '/')[8]))\n| join kind=leftouter (\n resources\n | where type == \"microsoft.hybridcompute/machines\"\n | project machineId = id, MachineName = name, subscriptionId, resourceGroup, MachineStatus = properties.status, MachineProvisioningStatus = properties.provisioningState, MachineErrors = properties.errorDetails\n) on $left.targetMachineName == $right.MachineName and $left.resourceGroup == $right.resourceGroup and $left.subscriptionId == $right.subscriptionId\n| extend extractedDate = todatetime(extract(\"timestampUTC : (\\\\d{4}-\\\\d{2}-\\\\d{2})\", 1, tostring(properties.instanceView.status.message)))\n| extend isNotInDateRange = extractedDate < ago(3d) or isnull(extractedDate)\n| where properties.instanceView.status.message !contains \"SQL Server Extension Agent: Healthy\"\n or isNotInDateRange\n or properties.instanceView.status.message !contains \"uploadStatus : OK\"\n or properties.provisioningState != \"Succeeded\"\n or MachineStatus != \"Connected\"\n| project ID = id, MachineName, ResourceGroup = resourceGroup, SubscriptionID = subscriptionId, Location = location, \n LastReportedExtensionHealth = iif(properties.instanceView.status.message contains \"SQL Server Extension Agent: Healthy\", \"Healthy\", \"Unhealthy\"),\n LastExtensionUploadTimestamp = tostring(extractedDate),\n LastExtensionUploadStatus = iif(properties.instanceView.status.message contains \"uploadStatus : OK\", \"OK\", \"Unhealthy\"),\n ExtensionProvisioningState = properties.provisioningState,\n MachineStatus, MachineErrors, MachineProvisioningStatus\n| project OverallHealth = iif(LastReportedExtensionHealth == \"Healthy\" and LastExtensionUploadStatus == \"OK\" and ExtensionProvisioningState == \"Succeeded\" and MachineStatus == \"Connected\" and MachineProvisioningStatus == \"Succeeded\", \"Healthy\", \"Unhealthy\")\n| where OverallHealth == \"Healthy\"\n| summarize HealthyExtensions = count()",
"isOptional": true
},
{
"name": "queryScope",
"value": {
"scope": 0,
"values": []
},
"isOptional": true
}
],
"type": "Extension/HubsExtension/PartType/ArgQuerySingleValueTile",
"settings": {},
"partHeader": {
"title": "Overall Healthy SQL Server Extensions",
"subtitle": "The count of overall healthy SQL Server extensions should be the same as the count of SQL Server extensions."
}
}
},
{
"position": {
"x": 0,
"y": 2,
"colSpan": 6,
"rowSpan": 4
},
"metadata": {
"inputs": [
{
"name": "isShared",
"isOptional": true
},
{
"name": "queryId",
"isOptional": true
},
{
"name": "formatResults",
"isOptional": true
},
{
"name": "partTitle",
"value": "Query 1",
"isOptional": true
},
{
"name": "chartType",
"value": 2,
"isOptional": true
},
{
"name": "queryScope",
"value": {
"scope": 0,
"values": []
},
"isOptional": true
},
{
"name": "query",
"value": "resources\n | where type =~ 'microsoft.hybridcompute/machines/extensions'\n | where properties.type in ('WindowsAgent.SqlServer','LinuxAgent.SqlServer')\n | parse id with * '/providers/Microsoft.HybridCompute/machines/' machineName '/extensions/' *\n | parse properties with * 'uploadStatus : ' uploadStatus ';' *\n | project uploadStatus, subscriptionId, resourceGroup, machineName\n | summarize count() by uploadStatus",
"isOptional": true
}
],
"type": "Extension/HubsExtension/PartType/ArgQueryChartTile",
"settings": {},
"partHeader": {
"title": "SQL Extension DPS Upload Status",
"subtitle": "'OK' is good. Anaything else should be investigated."
}
}
},
{
"position": {
"x": 6,
"y": 2,
"colSpan": 6,
"rowSpan": 4
},
"metadata": {
"inputs": [
{
"name": "isShared",
"isOptional": true
},
{
"name": "queryId",
"isOptional": true
},
{
"name": "formatResults",
"isOptional": true
},
{
"name": "partTitle",
"value": "Query 1",
"isOptional": true
},
{
"name": "queryScope",
"value": {
"scope": 0,
"values": []
},
"isOptional": true
},
{
"name": "chartType",
"value": 2,
"isOptional": true
},
{
"name": "query",
"value": "resources\n| where type =~ 'microsoft.hybridcompute/machines/extensions'\n| where properties.type in ('WindowsAgent.SqlServer', 'LinuxAgent.SqlServer')\n| parse id with * '/providers/Microsoft.HybridCompute/machines/' machineName '/extensions/' *\n| extend extractedDateString = extract(\"timestampUTC : (\\\\d{4}-\\\\d{2}-\\\\d{2})\", 1, tostring(properties.instanceView.status.message))\n| extend extractedDateString = case(\n isnull(extractedDateString) or extractedDateString == '', \n '1900-01-01T00:00:00Z', \n extractedDateString\n)\n| extend extractedDate = todatetime(extractedDateString)\n| extend isRecent = case(extractedDate > ago(1d), \"Less than 1 day ago\", extractedDate > ago(3d), \"1 to 3 days ago\", \"More than 3 days ago\")\n| summarize count() by isRecent",
"isOptional": true
}
],
"type": "Extension/HubsExtension/PartType/ArgQueryChartTile",
"settings": {},
"partHeader": {
"title": "SQL Extension Status Update Time",
"subtitle": "Status should be updated every 5 minutes."
}
}
},
{
"position": {
"x": 12,
"y": 2,
"colSpan": 6,
"rowSpan": 4
},
"metadata": {
"inputs": [
{
"name": "isShared",
"isOptional": true
},
{
"name": "queryId",
"isOptional": true
},
{
"name": "formatResults",
"isOptional": true
},
{
"name": "partTitle",
"value": "Query 1",
"isOptional": true
},
{
"name": "chartType",
"value": 2,
"isOptional": true
},
{
"name": "queryScope",
"value": {
"scope": 0,
"values": []
},
"isOptional": true
},
{
"name": "query",
"value": "resources\n| where type == \"microsoft.hybridcompute/machines/extensions\"\n| where properties.type in (\"WindowsAgent.SqlServer\", \"LinuxAgent.SqlServer\")\n| summarize count() by tostring(properties.provisioningState)",
"isOptional": true
}
],
"type": "Extension/HubsExtension/PartType/ArgQueryChartTile",
"settings": {},
"partHeader": {
"title": "SQL Extension Provisioning State",
"subtitle": "Provisioning State should normally be 'Succeeded'"
}
}
},
{
"position": {
"x": 0,
"y": 6,
"colSpan": 6,
"rowSpan": 4
},
"metadata": {
"inputs": [
{
"name": "isShared",
"isOptional": true
},
{
"name": "queryId",
"isOptional": true
},
{
"name": "formatResults",
"isOptional": true
},
{
"name": "partTitle",
"value": "Query 1",
"isOptional": true
},
{
"name": "query",
"value": "resources\n| where type == \"microsoft.hybridcompute/machines/extensions\" \n| where properties.type in (\"WindowsAgent.SqlServer\", \"LinuxAgent.SqlServer\")\n| summarize count() by tostring(properties.typeHandlerVersion)",
"isOptional": true
},
{
"name": "chartType",
"value": 2,
"isOptional": true
},
{
"name": "queryScope",
"value": {
"scope": 0,
"values": []
},
"isOptional": true
}
],
"type": "Extension/HubsExtension/PartType/ArgQueryChartTile",
"settings": {},
"partHeader": {
"title": "SQL Extension Versions",
"subtitle": "Extension versions should be on a recent version, at least within one year. https://aka.ms/arcsqlreleasenotes"
}
}
},
{
"position": {
"x": 6,
"y": 6,
"colSpan": 6,
"rowSpan": 4
},
"metadata": {
"inputs": [
{
"name": "isShared",
"isOptional": true
},
{
"name": "queryId",
"isOptional": true
},
{
"name": "formatResults",
"isOptional": true
},
{
"name": "partTitle",
"value": "Query 1",
"isOptional": true
},
{
"name": "query",
"value": "resources\n| where type == \"microsoft.hybridcompute/machines/extensions\"\n| where properties.type in (\"WindowsAgent.SqlServer\", \"LinuxAgent.SqlServer\")\n| project GeneralHealth = iif(properties.instanceView.status.message contains \"SQL Server Extension Agent: Healthy\", \"Healthy\", \"Unhealthy\")\n| summarize count() by GeneralHealth",
"isOptional": true
},
{
"name": "chartType",
"value": 2,
"isOptional": true
},
{
"name": "queryScope",
"value": {
"scope": 0,
"values": []
},
"isOptional": true
}
],
"type": "Extension/HubsExtension/PartType/ArgQueryChartTile",
"settings": {},
"partHeader": {
"title": "SQL Extension General Health",
"subtitle": "The health as reported in the extension of the extension itself."
}
}
},
{
"position": {
"x": 12,
"y": 6,
"colSpan": 6,
"rowSpan": 4
},
"metadata": {
"inputs": [
{
"name": "isShared",
"isOptional": true
},
{
"name": "queryId",
"isOptional": true
},
{
"name": "formatResults",
"isOptional": true
},
{
"name": "partTitle",
"value": "Query 1",
"isOptional": true
},
{
"name": "query",
"value": "resources\n| where type == \"microsoft.hybridcompute/machines/extensions\" \n| where properties.type in (\"WindowsAgent.SqlServer\", \"LinuxAgent.SqlServer\") \n| extend targetMachineName = tolower(tostring(split(id, '/')[8])) // Extract the machine name from the extension's id\n| join kind=leftouter (\n resources\n | where type == \"microsoft.hybridcompute/machines\"\n | project machineId = id, MachineName = name, subscriptionId, LowerMachineName = tolower(name), resourceGroup , MachineStatus= properties.status , MachineProvisioningStatus= properties.provisioningState\n) on $left.targetMachineName == $right.LowerMachineName and $left.resourceGroup == $right.resourceGroup and $left.subscriptionId == $right.subscriptionId // Join Based on MachineName in the id and the machine's name, the resource group, and the subscription. This join allows us to present the data of the machine as well as the extension in the final output.\n| summarize count() by tostring(MachineProvisioningStatus)",
"isOptional": true
},
{
"name": "chartType",
"value": 2,
"isOptional": true
},
{
"name": "queryScope",
"value": {
"scope": 0,
"values": []
},
"isOptional": true
}
],
"type": "Extension/HubsExtension/PartType/ArgQueryChartTile",
"settings": {},
"partHeader": {
"title": "Machine Provisioning State",
"subtitle": "Machines should have a provisioning state of 'Succeeded'"
}
}
},
{
"position": {
"x": 0,
"y": 10,
"colSpan": 6,
"rowSpan": 4
},
"metadata": {
"inputs": [
{
"name": "isShared",
"isOptional": true
},
{
"name": "queryId",
"isOptional": true
},
{
"name": "formatResults",
"isOptional": true
},
{
"name": "partTitle",
"value": "Query 1",
"isOptional": true
},
{
"name": "query",
"value": "resources\n| where type == \"microsoft.hybridcompute/machines/extensions\" \n| where properties.type in (\"WindowsAgent.SqlServer\", \"LinuxAgent.SqlServer\") \n| extend targetMachineName = tolower(tostring(split(id, '/')[8])) // Extract the machine name from the extension's id\n| join kind=leftouter (\n resources\n | where type == \"microsoft.hybridcompute/machines\"\n | project machineId = id, MachineName = name, subscriptionId, LowerMachineName = tolower(name), resourceGroup , MachineStatus= properties.status , MachineProvisioningStatus= properties.provisioningState\n) on $left.targetMachineName == $right.LowerMachineName and $left.resourceGroup == $right.resourceGroup and $left.subscriptionId == $right.subscriptionId // Join Based on MachineName in the id and the machine's name, the resource group, and the subscription. This join allows us to present the data of the machine as well as the extension in the final output.\n| summarize count() by tostring(MachineStatus)",
"isOptional": true
},
{
"name": "chartType",
"value": 2,
"isOptional": true
},
{
"name": "queryScope",
"value": {
"scope": 0,
"values": []
},
"isOptional": true
}
],
"type": "Extension/HubsExtension/PartType/ArgQueryChartTile",
"settings": {},
"partHeader": {
"title": "Machine Connectivity Status",
"subtitle": "Machines should have a state of 'Connected'"
}
}
},
{
"position": {
"x": 6,
"y": 10,
"colSpan": 6,
"rowSpan": 4
},
"metadata": {
"inputs": [
{
"name": "isShared",
"isOptional": true
},
{
"name": "queryId",
"isOptional": true
},
{
"name": "formatResults",
"isOptional": true
},
{
"name": "partTitle",
"value": "Query 1",
"isOptional": true
},
{
"name": "chartType",
"value": 2,
"isOptional": true
},
{
"name": "queryScope",
"value": {
"scope": 0,
"values": []
},
"isOptional": true
},
{
"name": "query",
"value": "resources\n| where type == \"microsoft.hybridcompute/machines/extensions\" \n| where properties.type in (\"WindowsAgent.SqlServer\", \"LinuxAgent.SqlServer\") \n| extend targetMachineName = tolower(tostring(split(id, '/')[8])) // Extract the machine name from the extension's id\n| join kind=leftouter (\n resources\n | where type == \"microsoft.hybridcompute/machines\"\n | project machineId = id, MachineName = name, subscriptionId, LowerMachineName = tolower(name), resourceGroup , MachineExtensionServiceStatus = properties.serviceStatuses.extensionService.status\n) on $left.targetMachineName == $right.LowerMachineName and $left.resourceGroup == $right.resourceGroup and $left.subscriptionId == $right.subscriptionId // Join Based on MachineName in the id and the machine's name, the resource group, and the subscription. This join allows us to present the data of the machine as well as the extension in the final output.\n| summarize count() by tostring(MachineExtensionServiceStatus)",
"isOptional": true
}
],
"type": "Extension/HubsExtension/PartType/ArgQueryChartTile",
"settings": {},
"partHeader": {
"title": "Machine Extension Service Status",
"subtitle": "The Machine Extension Service status should be 'Running'"
}
}
},
{
"position": {
"x": 12,
"y": 10,
"colSpan": 6,
"rowSpan": 4
},
"metadata": {
"inputs": [
{
"name": "isShared",
"isOptional": true
},
{
"name": "queryId",
"isOptional": true
},
{
"name": "formatResults",
"isOptional": true
},
{
"name": "partTitle",
"value": "Query 1",
"isOptional": true
},
{
"name": "query",
"value": "//Machine Guest Configuration Service Status\nresources\n| where type == \"microsoft.hybridcompute/machines/extensions\" \n| where properties.type in (\"WindowsAgent.SqlServer\", \"LinuxAgent.SqlServer\") \n| extend targetMachineName = tolower(tostring(split(id, '/')[8])) // Extract the machine name from the extension's id\n| join kind=leftouter (\n resources\n | where type == \"microsoft.hybridcompute/machines\"\n | project machineId = id, MachineName = name, subscriptionId, LowerMachineName = tolower(name), resourceGroup , GuestConfigurationService = properties.serviceStatuses.guestConfigurationService.status\n) on $left.targetMachineName == $right.LowerMachineName and $left.resourceGroup == $right.resourceGroup and $left.subscriptionId == $right.subscriptionId // Join Based on MachineName in the id and the machine's name, the resource group, and the subscription. This join allows us to present the data of the machine as well as the extension in the final output.\n| summarize count() by tostring(GuestConfigurationService)",
"isOptional": true
},
{
"name": "chartType",
"value": 2,
"isOptional": true
},
{
"name": "queryScope",
"value": {
"scope": 0,
"values": []
},
"isOptional": true
}
],
"type": "Extension/HubsExtension/PartType/ArgQueryChartTile",
"settings": {},
"partHeader": {
"title": "Machine Guest Configuration Service Status",
"subtitle": "The Machine Guest Configuration Status should be 'Running'"
}
}
},
{
"position": {
"x": 0,
"y": 14,
"colSpan": 18,
"rowSpan": 12
},
"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/extensions\" \r\n| where properties.type in (\"WindowsAgent.SqlServer\", \"LinuxAgent.SqlServer\") \r\n| extend targetMachineName = tolower(tostring(split(id, '/')[8])) // Extract the machine name from the extension's id\r\n| join kind=leftouter (\r\n resources\r\n | where type == \"microsoft.hybridcompute/machines\"\r\n | project machineId = id, MachineName = name, subscriptionId, LowerMachineName = tolower(name), resourceGroup , MachineStatus= properties.status , MachineProvisioningStatus= properties.provisioningState, MachineErrors = properties.errorDetails //Project relvant machine health information.\r\n) on $left.targetMachineName == $right.LowerMachineName and $left.resourceGroup == $right.resourceGroup and $left.subscriptionId == $right.subscriptionId // Join Based on MachineName in the id and the machine's name, the resource group, and the subscription. This join allows us to present the data of the machine as well as the extension in the final output.\r\n| extend statusExpirationLengthRange = 3d // Change this value to change the acceptable range for the last time an extension should have reported its status.\r\n| extend startDate = startofday(now() - statusExpirationLengthRange), endDate = startofday(now()) // Get the start and end positon for the given range.\r\n| extend extractedDateString = extract(\"timestampUTC : (\\\\d{4}\\\\W\\\\d{2}\\\\W\\\\d{2})\", 1, tostring(properties.instanceView.status.message)) // Extracting the date string for the LastUploadTimestamp. Is empty if none is found.\r\n| extend extractedDateStringYear = split(extractedDateString, '/')[0], extractedDateStringMonth = split(extractedDateString, '/')[1], extractedDateStringDay = split(extractedDateString, '/')[2] // Identifying each of the parts of the date that was extracted from the message.\r\n| extend extractedDate = todatetime(strcat(extractedDateStringYear,\"-\",extractedDateStringMonth,\"-\",extractedDateStringDay,\"T00:00:00Z\")) // Converting to a datetime object and rewriting string into ISO format because todatetime() does not work using the previous format.\r\n| extend isNotInDateRange = not(extractedDate >= startDate and extractedDate <= endDate) // Created bool which is true if the date we extracted from the message is not within the specified range. This bool will also be true if the date was not found in the message.\r\n| where properties.instanceView.status.message !contains \"SQL Server Extension Agent: Healthy\" // Begin searching for unhealthy extensions using the following 1. Does extension report being healthy. 2. Is last upload within the given range. 3. Is the upload status in an OK state. 4. Is provisioning state not in a succeeded state.\r\n or isNotInDateRange\r\n or properties.instanceView.status.message !contains \"uploadStatus : OK\"\r\n or properties.provisioningState != \"Succeeded\"\r\n or MachineStatus != \"Connected\"\r\n| extend FailureReasons = strcat( // Makes a String to list all the reason that this resource got flagged for\r\n iif(MachineStatus != \"Connected\",strcat(\"- Machine's status is \", MachineStatus,\" -\"),\"\") ,\r\n iif(MachineErrors != \"[]\",\"- Machine reports errors -\", \"\"),\r\n iif(properties.instanceView.status.message !contains \"SQL Server Extension Agent: Healthy\",\"- Extension reported unhealthy -\",\"\"), \r\n iif(isNotInDateRange,\"- Last upload outside acceptable range -\",\"\"),\r\n iif(properties.instanceView.status.message !contains \"uploadStatus : OK\",\"- Upload status is not reported OK -\",\"\"), \r\n iif(properties.provisioningState != \"Succeeded\",strcat(\"- Extension provisiong state is \", properties.provisioningState,\" -\"),\"\") \r\n )\r\n| extend RecommendedAction = //Attempt to Identify RootCause based on information gathered, and point customer to what they should investigate first.\r\n iif(MachineStatus == \"Disconnected\", \"Machine is disconnected. Please reconnect the machine.\",\r\n iif(MachineStatus == \"Expired\", \"Machine cert is expired. Go to the machine on the Azure Portal for more information on how to resolve this issue.\",\r\n iif(MachineStatus != \"Connected\", strcat(\"Machine status is \", MachineStatus,\". Investigate and resolve this issue.\"),\r\n iif(MachineProvisioningStatus != \"Succeeded\", strcat(\"Machine provisioning status is \", MachineProvisioningStatus, \". Investigate and resolve machine provisioning status\"),\r\n iff(MachineErrors != \"[]\", \"Machine is reporting errors. Investigate and resolve machine errors\",\r\n iif(properties.provisioningState != \"Succeeded\", strcat(\"Extension provisioning status is \", properties.provisioningState,\". Investigate and resolve extension provisioning state.\"),\r\n iff(properties.instanceView.status.message !contains \"SQL Server Extension Agent:\" and properties.instanceView.status.message contains \"SQL Server Extension Agent Deployer\", \"SQL Server extension eeployer ran. However, SQL Server extension seems to not be running. Verify that the extension is currently running.\",\r\n iff(properties.instanceView.status.message !contains \"uploadStatus : OK\" or isNotInDateRange or properties.instanceView.status.message !contains \"SQL Server Extension Agent: Healthy\", \"Extension reported as unhealthy. View FailureReasons and LastExtensionStatusMessage for more information as to the cause of the failure.\",\r\n \"Unable to reccommend actions. Please view FailureReasons.\"\r\n )\r\n )\r\n )\r\n )\r\n )\r\n )\r\n )\r\n )\r\n| project ID = id, MachineName, ResourceGroup = resourceGroup, SubscriptionID = subscriptionId, Location = location, RecommendedAction, FailureReasons, LicenseType = properties.settings.LicenseType, \r\n LastReportedExtensionHealth = iif(properties.instanceView.status.message !contains \"SQL Server Extension Agent: Healthy\", \"Unhealthy\", \"Healthy\"),\r\n LastExtensionUploadTimestamp = iif(indexof(properties.instanceView.status.message, \"timestampUTC : \") > 0,\r\n substring(properties.instanceView.status.message, indexof(properties.instanceView.status.message, \"timestampUTC : \") + 15, 10),\r\n \"no timestamp\"),\r\n LastExtensionUploadStatus = iif(indexof(properties.instanceView.status.message, \"uploadStatus : OK\") > 0, \"OK\", \"Unhealthy\"),\r\n ExtensionProvisioningState = properties.provisioningState,\r\n MachineStatus, MachineErrors, MachineProvisioningStatus,MachineId = machineId,\r\n LastExtensionStatusMessage = properties.instanceView.status.message",
"isOptional": true
},
{
"name": "queryScope",
"value": {
"scope": 0,
"values": []
},
"isOptional": true
}
],
"type": "Extension/HubsExtension/PartType/ArgQueryGridTile",
"settings": {},
"partHeader": {
"title": "Arc-enabled SQL Server Health",
"subtitle": ""
}
}
}
]
}
],
"metadata": {
"model": {
"timeRange": {
"value": {
"relative": {
"duration": 24,
"timeUnit": 1
}
},
"type": "MsPortalFx.Composition.Configuration.ValueTypes.TimeRange"
}
}
}
},
"name": "Arc-enabled SQL Server Health",
"type": "Microsoft.Portal/dashboards",
"location": "INSERT LOCATION",
"tags": {
"hidden-title": "Arc-enabled SQL Server Health"
},
"apiVersion": "2022-12-01-preview"
}