Virtual Machine Monitoring KQL yielding empty results

anayakoraPK 1 Reputation point
2022-08-23T08:36:16.903+00:00

I have enabled Azure Monitoring in one of our virtual machine. Is been 4 days the virtual machine is on, below is the query:

Perf
| where ObjectName == "Memory" and
(CounterName == "Available MBytes Memory" or // the name used in Linux records
CounterName == "Available MBytes") // the name used in Windows records
| summarize avg(CounterValue) by bin(TimeGenerated, 15min), Computer, _ResourceId // bin is used to set the time grain to 15 minutes
| render timechart
The output of Perf itself is empty. The same thing goes for Update, it show me zero results.

These are the two extensions I have installed on the VM

233956-1.png

Virtual Machine Monitoring KQL yielding empty results

233993-2.png

Any Suggestion?

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,658 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Andrew Blumhardt 10,051 Reputation points Microsoft Employee
    2022-08-23T14:31:29.433+00:00

    I think you need to setup some data collection rules. The agent extension does not have any default collection beyond the heartbeat table. https://learn.microsoft.com/en-us/azure/azure-monitor/essentials/data-collection-rule-overview

    0 comments No comments

  2. Maxim Sergeev 6,586 Reputation points Microsoft Employee
    2022-08-23T17:51:14.003+00:00

    If you have enabled VM Insights, you need to use another Table - InsightsMetrics

    InsightsMetrics  
    | where Origin == "vm.azm.ms"  
    | where Namespace == "Memory" and Name == "AvailableMB"  
    | extend TotalMemory = toreal(todynamic(Tags)["vm.azm.ms/memorySizeMB"]) | extend AvailableMemoryPercentage = (toreal(Val) / TotalMemory) * 100.0  
    | summarize AggregatedValue = avg(AvailableMemoryPercentage) by bin(TimeGenerated, 15m), Computer, _ResourceId  
    | render timechart  
    
    0 comments No comments

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.