|
92 | 92 | "type": 3,
|
93 | 93 | "content": {
|
94 | 94 | "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:\"", |
96 | 96 | "size": 4,
|
97 | 97 | "queryType": 1,
|
98 | 98 | "resourceType": "microsoft.resourcegraph/resources",
|
|
122 | 122 | "type": 3,
|
123 | 123 | "content": {
|
124 | 124 | "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", |
126 | 126 | "size": 3,
|
127 | 127 | "title": "SQL Versions",
|
128 | 128 | "queryType": 1,
|
|
139 | 139 | "type": 3,
|
140 | 140 | "content": {
|
141 | 141 | "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", |
143 | 143 | "size": 3,
|
144 | 144 | "title": "Azure Defender Status",
|
145 | 145 | "queryType": 1,
|
|
172 | 172 | "type": 3,
|
173 | 173 | "content": {
|
174 | 174 | "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", |
176 | 176 | "size": 3,
|
177 | 177 | "title": "SQL Editions",
|
178 | 178 | "queryType": 1,
|
|
205 | 205 | "type": 3,
|
206 | 206 | "content": {
|
207 | 207 | "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", |
209 | 209 | "size": 3,
|
210 | 210 | "title": "LicenseType",
|
211 | 211 | "queryType": 1,
|
|
222 | 222 | "type": 3,
|
223 | 223 | "content": {
|
224 | 224 | "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", |
226 | 226 | "size": 0,
|
227 | 227 | "showAnalytics": true,
|
228 | 228 | "queryType": 1,
|
|
0 commit comments