Skip to content

Commit ecbb874

Browse files
committed
Azure Monitor VM Insights log query fixes
1 parent 65321f7 commit ecbb874

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

articles/azure-monitor/insights/vminsights-log-search.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ let Today = now(); VMComputer | extend DaysSinceBoot = Today - BootTime | summar
261261
### Summary of Azure VMs by image, location, and SKU
262262

263263
```kusto
264-
VMComputer | where AzureLocation != "" | summarize by ComputerName, AzureImageOffering, AzureLocation, AzureImageSku
264+
VMComputer | where AzureLocation != "" | summarize by Computer, AzureImageOffering, AzureLocation, AzureImageSku
265265
```
266266

267267
### List the physical memory capacity of all managed computers
@@ -279,7 +279,7 @@ VMComputer | summarize arg_max(TimeGenerated, *) by _ResourceId | project Comput
279279
### Find all processes with "sql" in the command line
280280

281281
```kusto
282-
VMComputer | where CommandLine contains_cs "sql" | summarize arg_max(TimeGenerated, *) by _ResourceId
282+
VMProcess | where CommandLine contains_cs "sql" | summarize arg_max(TimeGenerated, *) by _ResourceId
283283
```
284284

285285
### Find a machine (most recent record) by resource name
@@ -303,7 +303,7 @@ VMProcess | where Machine == "m-559dbcd8-3130-454d-8d1d-f624e57961bc" | summariz
303303
### List all computers running SQL Server
304304

305305
```kusto
306-
VMComputer | where AzureResourceName in ((search in (VMProcess) "\*sql\*" | distinct Machine)) | distinct Computer
306+
VMComputer | where AzureResourceName in ((search in (VMProcess) "*sql*" | distinct Machine)) | distinct Computer
307307
```
308308

309309
### List all unique product versions of curl in my datacenter
@@ -315,7 +315,7 @@ VMProcess | where ExecutableName == "curl" | distinct ProductVersion
315315
### Create a computer group of all computers running CentOS
316316

317317
```kusto
318-
VMComputer | where OperatingSystemFullName contains_cs "CentOS" | distinct ComputerName
318+
VMComputer | where OperatingSystemFullName contains_cs "CentOS" | distinct Computer
319319
```
320320

321321
### Bytes sent and received trends

0 commit comments

Comments
 (0)