Creating dashboard and monitoring live data of it from dashboards

Varma 1,380 Reputation points
2024-07-03T18:59:12.87+00:00

Please share any high level document or steps

for below , I want to monitor live data of below requirements using dashboard:

  1. Top 5 VM CPU usage ( list the machine name and segment of the 5 machines with the most high CPU utilization blocks (90%) over the last 24 hours)

Top 5 VM Lowest available Memory percentage ( list the machine name and segment of the 5 machines with the low available memory blocks (<10% available memory) over the last 24 hours)

3.

Top 5 VM Logical Disk space used ( list the machine name and segment of the 5 machines with the lowest amount of free space on the OS drive right now)

4.

CPU Usage aggregate by segment

Machine overview which includes machine name, resource group, location and its status (sorted by status so that machines that are not running are at the top)

Azure Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
3,255 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Vinodh247 20,476 Reputation points
    2024-07-11T01:39:30.1333333+00:00

    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

    1. In the Azure portal, go to Azure Monitor.
    2. Click on Logs to open the Log Analytics workspace.
    3. 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
    
    1. Pin this query to a new dashboard by clicking the "Pin to dashboard" button in the top right.
    2. Customize the tile name and details as needed.

    Top 5 VMs by Lowest Available Memory

    1. 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
    
    
    1. Pin this query to the dashboard.

    Top 5 VMs by Lowest Disk Space

    1. 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
    
    
    1. Pin this query to the dashboard.

    CPU Usage by Segment

    1. 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
    
    
    1. Pin this query to the dashboard.

    Machine Overview

    1. 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
    
    
    1. Pin this query to the dashboard.
    2. Customize the tile names and layouts as needed.
    3. 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.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.