SOLVED

Understanding IOPS with Log Analytics

%3CLINGO-SUB%20id%3D%22lingo-sub-1771611%22%20slang%3D%22en-US%22%3EUnderstanding%20IOPS%20with%20Log%20Analytics%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1771611%22%20slang%3D%22en-US%22%3E%3CP%3EHi%3CBR%20%2F%3EI'm%20trying%20to%20analyze%20IOPS%20for%20VMs%20to%20optimize%20their%20size%20and%20I%20came%20accross%20this%20query%3A%3C%2FP%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-powerquery%22%3E%3CCODE%3EPerf%0A%7C%20where%20ObjectName%20%3D%3D%20%22LogicalDisk%22%20%0A%7C%20where%20CounterName%20%3D%3D%20%22Disk%20Transfers%2Fsec%22%20%0A%7C%20summarize%20avg(CounterValue)%20by%20Computer%2C%20bin(TimeGenerated%2C%205m)%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhich%20sounds%20good.%20However%2C%20I%20can't%20find%20that%20specific%20metric%20when%20checking%20the%20Portal%20and%20going%20through%20Guest%20Metrics.%3C%2FP%3E%3CP%3EI%20just%20want%20to%20make%20sure%20that%20this%20would%20return%20the%20total%20IOPS%20of%20each%20server.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%20in%20advance%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1771611%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3ELog%20Analytics%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMetrics%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EQuery%20Language%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1804035%22%20slang%3D%22en-US%22%3ERe%3A%20Understanding%20IOPS%20with%20Log%20Analytics%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1804035%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F104993%22%20target%3D%22_blank%22%3E%40Dante%20Nahuel%20Ciai%3C%2FA%3E%26nbsp%3Bnot%20sure%20I%20undestand%20you%20correctly...%3C%2FP%3E%0A%3CP%3EThe%20counters%20you%20calculate%20through%20Log%20Analytics%20are%20not%20related%20to%20the%20metric%20you%20can%20see%20in%20the%20metrics%20UX.%20Instead%2C%20they%20are%20collected%20as%20performance%20log%20records%20by%20the%20Log%20Analytics%20agent.%3C%2FP%3E%0A%3CP%3EIf%20you're%20satisfied%20with%20the%20disk%20couner%20in%20the%20below%20query%2C%20you%20can%20create%20your%20own%20visual%20based%20on%20it%20(you%20can%20display%20it%20over%20time%2C%20of%20for%20all%20VMs)%20and%20pin%20it%20to%20a%20dashboard.%20Would%20that%20meet%20your%20needs%3F%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIs%20this%20the%20issue%2C%20or%20did%20you%20mean%20something%20else%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1819041%22%20slang%3D%22en-US%22%3ERe%3A%20Understanding%20IOPS%20with%20Log%20Analytics%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1819041%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F54923%22%20target%3D%22_blank%22%3E%40Noa%20Kuperberg%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%20for%20clarifying%20that.%20I%20was%20having%20a%20problem%20understanding%20where%20did%20the%20discrepancy%20between%20the%20portal%20VM%20metrics%20and%20the%20Log%20analytics%20came%20from.%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
Contributor

Hi
I'm trying to analyze IOPS for VMs to optimize their size and I came accross this query:

 

 

Perf
| where ObjectName == "LogicalDisk" 
| where CounterName == "Disk Transfers/sec" 
| summarize avg(CounterValue) by Computer, bin(TimeGenerated, 5m)

 

 

Which sounds good. However, I can't find that specific metric when checking the Portal and going through Guest Metrics.

I just want to make sure that this would return the total IOPS of each server.

 

Thank you in advance

2 Replies
best response confirmed by Dante Nahuel Ciai (Contributor)
Solution

@Dante Nahuel Ciai not sure I undestand you correctly...

The counters you calculate through Log Analytics are not related to the metric you can see in the metrics UX. Instead, they are collected as performance log records by the Log Analytics agent.

If you're satisfied with the disk couner in the below query, you can create your own visual based on it (you can display it over time, of for all VMs) and pin it to a dashboard. Would that meet your needs?

 

Is this the issue, or did you mean something else?

@Noa Kuperberg 

Thank you for clarifying that. I was having a problem understanding where did the discrepancy between the portal VM metrics and the Log analytics came from.