Hi Varma,
Thanks for reaching out to Microsoft Q&A.
To monitor live dashboard for your Azure VM's based on the requirements you have outlined, you can create an Azure Dashboard using Azure Monitor
Top 5 VMs by CPU Usage
- In the Azure portal, go to Azure Monitor.
- Click on Logs to open the Log Analytics workspace.
- Create a new query to get the top 5 VMs by CPU usage over the last 24 hours:
Perf | where CounterName == "% Processor Time" and ObjectName == "Processor" and InstanceName == "_Total" | summarize AggregatedValue = avg(CounterValue) by Computer | top 5 by AggregatedValue desc | project Computer, AggregatedValue
- Pin this query to a new dashboard by clicking the "Pin to dashboard" button in the top right.
- Customize the tile name and details as needed.
Top 5 VMs by Lowest Available Memory
- Create a new query to get the top 5 VMs by lowest available memory over the last 24 hours:
Perf
| where CounterName == "Available MBytes"
| summarize AggregatedValue = avg(CounterValue) by Computer
| top 5 by AggregatedValue asc
| project Computer, AggregatedValue
- Pin this query to the dashboard.
Top 5 VMs by Lowest Disk Space
- Create a new query to get the top 5 VMs by lowest disk space on the OS drive:
Perf
| where CounterName == "% Used Space"
| where InstanceName == "C:"
| summarize AggregatedValue = avg(CounterValue) by Computer
| top 5 by AggregatedValue desc
| project Computer, AggregatedValue
- Pin this query to the dashboard.
CPU Usage by Segment
- Create a new query to get the CPU usage aggregated by segment:
Perf
| where CounterName == "% Processor Time" and ObjectName == "Processor" and InstanceName == "_Total"
| summarize AggregatedValue = avg(CounterValue) by bin(TimeGenerated, 1h), Computer
| summarize AggregatedValue = avg(AggregatedValue) by Computer
| extend Segment = extract(@"^(.+?)-", 1, Computer)
| summarize AggregatedValue = avg(AggregatedValue) by Segment
| render piechart
- Pin this query to the dashboard.
Machine Overview
- Create a new query to get the machine overview information:
Resources
| where type == 'microsoft.compute/virtualmachines'
| project name, resourceGroup, location, powerState
| order by powerState desc
- Pin this query to the dashboard.
- Customize the tile names and layouts as needed.
- Save the dashboard and it will now display the live data for the specified requirements.
This will provide you with a comprehensive dashboard to monitor the live data for your virtual machines. Please remember this is only an example, you might have to tweak or replace some of the codes provided to suit your requirement.
Please 'Upvote'(Thumbs-up) and 'Accept' as an answer if the reply was helpful. This will benefit other community members who face the same issue.