Welcome to Microsoft Q&A Forum, thank you for posting your query here!
To find the average CPU Utilization of Azure Virtual Machines, use the below query.
Perf
| where (ObjectName == "Processor" and CounterName == "% Processor Time" and InstanceName == "_Total")
or (ObjectName == "Memory" and CounterName == "Available MBytes")
| summarize avg(CounterValue) by TimeGenerated, ObjectName, CounterName, InstanceName
| project TimeGenerated, ObjectName, CounterName, InstanceName, CounterValue = avg_CounterValue
if that won't work, try this query,
Perf
| where ObjectName == "Processor"
| project TimeGenerated, InstanceName, CounterValue
| summarize AvgCPU = avg(CounterValue) by bin(TimeGenerated, 1m), InstanceName
| project TimeGenerated, ProcessID = InstanceName, AvgCPU
It would be helpful for you if you can refer to the below example queries.
Hope this helps!
Please reply if you there are any challenges.
Please do not forget to "Accept the answer” and “upvote it” wherever the information provided helps you, this can be beneficial to other community members.it would be greatly appreciated and helpful to others.
Thanks