Azure Metric vs Performance counters show different values

Copper Contributor


Azure Metric vs Performance counters

Return values of network traffic are totally off, regardless of time frame between portal, log analytic query perf and InsightsMetrics. See screen off excel.

 

I have open log analytic workspace, select Time range Last 24 hours and one day 26/03/2024
Perf

| where TimeGenerated between (datetime(2024-03-26) .. datetime(2024-03-27))
| where Computer == "**********"
| where ObjectName == "Network Interface" and CounterName == "Bytes Sent/sec" or CounterName == "Bytes Received/sec"
| summarize BytsSent = sum(CounterValue) by bin(TimeGenerated, 1d),CounterName

InsightsMetrics
| where TimeGenerated between (datetime(2024-03-26) .. datetime(2024-03-27))
| where Origin == "vm.azm.ms"
| where Computer == "*******"
| where Namespace == "Network"
| where Name == "ReadBytesPerSecond" or Name == "WriteBytesPerSecond"
| extend Tags = parse_json(Tags)
| extend BytestoSec = toreal(Tags.["vm.azm.ms/bytes"])
| sort by TimeGenerated
| project TimeGenerated,Name,Val,BytestoSec
| summarize AggregatedValue = sum(BytestoSec) by bin(TimeGenerated, 1d),Name

 

I don’t know what im doing wrong or i don't understand . But sample interval in data collection rule is  15s, and  sample interval of metric is 60s.

 



2 Replies
I've run into something similar in the past. My understanding is that performance counters return data from the OS perspective whereas metrics are how Azure sees usage from a host perspective. I would rely on the performance counter data in Log Analytics over metric data.
Correctly.
According to the tests and metrics collected on the network infrastucture is log analytic value is more exact/ identical to what ststistic is provide. Azure metric is more or less general information, how system behave that is in my opinion.