Jun 06 2019 06:59 AM
Hi Guys,
Can someone give me the azure log analytics Query which will provide me the Memory (RAM) usage in percentage (Percent Memory Used) of all Virtual machines.
Jun 06 2019 11:57 AM
There is an example on the logs home page
It does have CPU info as well, but if you edit that out you have:
// Memory usage // Chart all computers' used memory over the last hour Perf | where TimeGenerated > ago(1h) | where CounterName == "% Used Memory" | project TimeGenerated, CounterName, CounterValue | summarize avg(CounterValue) by CounterName, bin(TimeGenerated, 1m) | render timechart
Note: you have to collect "% Used Memory" in log Analytics https://docs.microsoft.com/en-us/azure/azure-monitor/platform/data-sources-performance-counters
Feb 18 2021 02:28 AM
@Clive Watson From what I understand, this does not work for Windows VMs, since they do not have the "% Used Memory" performance counter.