Skip to content

Commit f2fdfa4

Browse files
committed
Removed expired Arc servers
1 parent 039387f commit f2fdfa4

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

samples/features/azure-arc/workbooks/Azure Arc Sql Servers.workbook

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292
"type": 3,
9393
"content": {
9494
"version": "KqlItem/1.0",
95-
"query": "resources\r\n| where type =~ 'microsoft.hybridcompute/machines'\r\n| where properties.detectedProperties.mssqldiscovered == \"true\"\r\n| count\r\n| extend Tittle=\"Number of Azure Arc SQL Servers:\"",
95+
"query": "resources\r\n| where type =~ 'microsoft.hybridcompute/machines'\r\n| where properties.detectedProperties.mssqldiscovered == \"true\" and properties.status != \"Expired\"\r\n| count\r\n| extend Tittle=\"Number of Azure Arc SQL Servers:\"",
9696
"size": 4,
9797
"queryType": 1,
9898
"resourceType": "microsoft.resourcegraph/resources",
@@ -122,7 +122,7 @@
122122
"type": 3,
123123
"content": {
124124
"version": "KqlItem/1.0",
125-
"query": "resources\r\n| where type =~ \"Microsoft.AzureArcData/sqlServerInstances\"\r\n| extend SQLInstance = id, AzureArcServer = strcat(\"/\",tostring(properties.containerResourceId))\r\n| where SQLInstance like \"{SQLInstance}\"\r\n| where AzureArcServer like \"{ServerName}\"\r\n| extend version = tostring(properties.version)\r\n| summarize count() by tostring(version)\r\n| sort by version",
125+
"query": "resources\r\n| where type =~ \"Microsoft.AzureArcData/sqlServerInstances\"\r\n| extend SQLInstance = id, AzureArcServer = tolower(tostring(properties.containerResourceId))\r\n| join kind=inner (resources\r\n| where type in ('microsoft.hybridcompute/machines')\r\n| where properties.status != \"Expired\"\r\n| extend id = tolower(id)) on $left.AzureArcServer == $right.id\r\n| where SQLInstance like \"{SQLInstance}\"\r\n| where AzureArcServer like \"{ServerName}\"\r\n| extend version = tostring(properties.version)\r\n| summarize count() by tostring(version)\r\n| sort by version",
126126
"size": 3,
127127
"title": "SQL Versions",
128128
"queryType": 1,
@@ -139,7 +139,7 @@
139139
"type": 3,
140140
"content": {
141141
"version": "KqlItem/1.0",
142-
"query": "resources\r\n| where type =~ \"Microsoft.AzureArcData/sqlServerInstances\"\r\n| extend SQLInstance = id, AzureArcServer = strcat(\"/\",tostring(properties.containerResourceId))\r\n| where SQLInstance like \"{SQLInstance}\"\r\n| where AzureArcServer like \"{ServerName}\"\r\n| extend azureDefenderStatus = tostring(properties.azureDefenderStatus)\r\n| summarize count() by tostring(azureDefenderStatus)\r\n| sort by azureDefenderStatus",
142+
"query": "resources\r\n| where type =~ \"Microsoft.AzureArcData/sqlServerInstances\"\r\n| extend SQLInstance = id, AzureArcServer = tolower(tostring(properties.containerResourceId))\r\n| join kind=inner (resources\r\n| where type in ('microsoft.hybridcompute/machines')\r\n| where properties.status != \"Expired\"\r\n| extend id = tolower(id)) on $left.AzureArcServer == $right.id\r\n| where SQLInstance like \"{SQLInstance}\"\r\n| where AzureArcServer like \"{ServerName}\"\r\n| extend azureDefenderStatus = tostring(properties.azureDefenderStatus)\r\n| summarize count() by tostring(azureDefenderStatus)\r\n| sort by azureDefenderStatus",
143143
"size": 3,
144144
"title": "Azure Defender Status",
145145
"queryType": 1,
@@ -172,7 +172,7 @@
172172
"type": 3,
173173
"content": {
174174
"version": "KqlItem/1.0",
175-
"query": "resources\r\n| where type =~ \"Microsoft.AzureArcData/sqlServerInstances\"\r\n| extend SQLInstance = id, AzureArcServer = strcat(\"/\",tostring(properties.containerResourceId))\r\n| where SQLInstance like \"{SQLInstance}\"\r\n| where AzureArcServer like \"{ServerName}\"\r\n| extend edition = tostring(properties.edition)\r\n| summarize count() by tostring(edition)\r\n| sort by edition",
175+
"query": "resources\r\n| where type =~ \"Microsoft.AzureArcData/sqlServerInstances\"\r\n| extend SQLInstance = id, AzureArcServer = tolower(tostring(properties.containerResourceId))\r\n| join kind=inner (resources\r\n| where type in ('microsoft.hybridcompute/machines')\r\n| where properties.status != \"Expired\"\r\n| extend id = tolower(id)) on $left.AzureArcServer == $right.id\r\n| where SQLInstance like \"{SQLInstance}\"\r\n| where AzureArcServer like \"{ServerName}\"\r\n| extend edition = tostring(properties.edition)\r\n| summarize count() by tostring(edition)\r\n| sort by edition",
176176
"size": 3,
177177
"title": "SQL Editions",
178178
"queryType": 1,
@@ -205,7 +205,7 @@
205205
"type": 3,
206206
"content": {
207207
"version": "KqlItem/1.0",
208-
"query": "resources\r\n| where type =~ \"Microsoft.AzureArcData/sqlServerInstances\"\r\n| extend SQLInstance = id, AzureArcServer = strcat(\"/\",tostring(properties.containerResourceId))\r\n| where SQLInstance like \"{SQLInstance}\"\r\n| where AzureArcServer like \"{ServerName}\"\r\n| extend licenseType = tostring(properties.licenseType)\r\n| summarize count() by tostring(licenseType)\r\n| sort by licenseType",
208+
"query": "resources\r\n| where type =~ \"Microsoft.AzureArcData/sqlServerInstances\"\r\n| extend SQLInstance = id, AzureArcServer = tolower(tostring(properties.containerResourceId))\r\n| join kind=inner (resources\r\n| where type in ('microsoft.hybridcompute/machines')\r\n| where properties.status != \"Expired\"\r\n| extend id = tolower(id)) on $left.AzureArcServer == $right.id\r\n| where SQLInstance like \"{SQLInstance}\"\r\n| where AzureArcServer like \"{ServerName}\"\r\n| extend licenseType = tostring(properties.licenseType)\r\n| summarize count() by tostring(licenseType)\r\n| sort by licenseType",
209209
"size": 3,
210210
"title": "LicenseType",
211211
"queryType": 1,
@@ -222,7 +222,7 @@
222222
"type": 3,
223223
"content": {
224224
"version": "KqlItem/1.0",
225-
"query": "resources\r\n| where type =~ \"Microsoft.AzureArcData/sqlServerInstances\"\r\n| extend SQLInstance = id, AzureArcServer = tostring(properties.containerResourceId)\r\n| where SQLInstance like \"{SQLInstance}\"\r\n| where AzureArcServer like \"{ServerName}\"\r\n| extend createdAt = format_datetime(todatetime(systemData.createdAt), 'yyyy-MM-dd hh:mm:ss')\r\n| extend version = tostring(properties.version)\r\n| extend edition = tostring(properties.edition)\r\n| extend currentVersion = tostring(properties.currentVersion)\r\n| extend licenseType = tostring(properties.licenseType)\r\n| extend azureDefenderStatus = tostring(properties.azureDefenderStatus)\r\n| extend patchLevel = tostring(properties.patchLevel)\r\n| extend vcores = toint(properties.vCore)\r\n| project createdAt,AzureArcServer,SQLInstance,version,currentVersion,patchLevel,edition,vcores,subscriptionId,licenseType,azureDefenderStatus\r\n",
225+
"query": "resources\r\n| where type =~ \"Microsoft.AzureArcData/sqlServerInstances\"\r\n| extend SQLInstance = id, AzureArcServer = tolower(tostring(properties.containerResourceId))\r\n| join kind=inner (resources\r\n| where type in ('microsoft.hybridcompute/machines')\r\n| where properties.status != \"Expired\"\r\n| extend id = tolower(id)) on $left.AzureArcServer == $right.id\r\n| where SQLInstance like \"{SQLInstance}\"\r\n| where AzureArcServer like \"{ServerName}\"\r\n| extend createdAt = format_datetime(todatetime(systemData.createdAt), 'yyyy-MM-dd hh:mm:ss')\r\n| extend version = tostring(properties.version)\r\n| extend edition = tostring(properties.edition)\r\n| extend currentVersion = tostring(properties.currentVersion)\r\n| extend licenseType = tostring(properties.licenseType)\r\n| extend azureDefenderStatus = tostring(properties.azureDefenderStatus)\r\n| extend patchLevel = tostring(properties.patchLevel)\r\n| extend vcores = toint(properties.vCore)\r\n| project createdAt,AzureArcServer,SQLInstance,version,currentVersion,patchLevel,edition,vcores,subscriptionId,licenseType,azureDefenderStatus\r\n",
226226
"size": 0,
227227
"showAnalytics": true,
228228
"queryType": 1,

0 commit comments

Comments
 (0)