SQL KQL syntaxt CPU/DTU/DATAI/O help request.

%3CLINGO-SUB%20id%3D%22lingo-sub-963150%22%20slang%3D%22en-US%22%3ESQL%20KQL%20syntaxt%20CPU%2FDTU%2FDATAI%2FO%20help%20request.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-963150%22%20slang%3D%22en-US%22%3E%3CP%3EHello%20everyone%2C%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'%20trying%20to%20bring%20CPU%20avg(90%25)%20of%20all%20sql%20databases%2C%20I%20started%20with%20the%20below%20kusto%20but%26nbsp%3B%20I'm%20sure%20that%20is%20not%20correct%2C%20I'm%20new%20at%20this%20and%20i'm%20still%20trying%20to%20understand%20it.%20could%20anyone%20help%20me%20with%20this%3F%3C%2FP%3E%3CP%3EI%20also%20have%20to%20do%20the%20same%20with%20DTUs%20and%20data%20I%2FO%2C%20but%20if%20you%20could%20help%20me%20with%20only%20one%20I%20may%20be%20able%20to%20get%20the%20rest%3C%2FP%3E%3CDIV%3E%3CDIV%3E%3CSPAN%3EPerf%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%7C%20%3C%2FSPAN%3E%3CSPAN%3Ewhere%3C%2FSPAN%3E%3CSPAN%3E%20ObjectName%20%3D%3D%3C%2FSPAN%3E%3CSPAN%3E%22SQLServer%3ADatabases%22%3C%2FSPAN%3E%20%3CSPAN%3Eand%3C%2FSPAN%3E%3CSPAN%3E%20CounterName%20%3D%3D%20%3C%2FSPAN%3E%3CSPAN%3E%22cpu_percent%22%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%7C%20%3C%2FSPAN%3E%3CSPAN%3Eproject%3C%2FSPAN%3E%3CSPAN%3E%20TimeGenerated%3C%2FSPAN%3E%3CSPAN%3E%2C%3C%2FSPAN%3E%3CSPAN%3E%20CounterName%3C%2FSPAN%3E%3CSPAN%3E%2C%3C%2FSPAN%3E%3CSPAN%3E%20CounterValue%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%7C%20%3C%2FSPAN%3E%3CSPAN%3Esummarize%3C%2FSPAN%3E%3CSPAN%3E%20avg%3C%2FSPAN%3E%3CSPAN%3E(%3C%2FSPAN%3E%3CSPAN%3ECounterValue%2C%2090%3C%2FSPAN%3E%3CSPAN%3E)%2C%3C%2FSPAN%3E%3CSPAN%3E%20bin%3C%2FSPAN%3E%3CSPAN%3E(%3C%2FSPAN%3E%3CSPAN%3ETimeGenerated%3C%2FSPAN%3E%3CSPAN%3E%2C%3C%2FSPAN%3E%20%3CSPAN%3E10%3C%2FSPAN%3E%3CSPAN%3Em%3C%2FSPAN%3E%3CSPAN%3E)%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%7C%20%3C%2FSPAN%3E%3CSPAN%3Erender%3C%2FSPAN%3E%3CSPAN%3E%20timechart%3C%2FSPAN%3E%3C%2FDIV%3E%3C%2FDIV%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-963150%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAzure%20Log%20Analytics%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-965615%22%20slang%3D%22en-US%22%3ERe%3A%20SQL%20KQL%20syntaxt%20CPU%2FDTU%2FDATAI%2FO%20help%20request.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-965615%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F434983%22%20target%3D%22_blank%22%3E%40dlaurora%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3EPerf%0A%7C%20where%20ObjectName%20%3D%3D%22SQLServer%3ADatabases%22%20and%20CounterName%20%3D%3D%20%22cpu_percent%22%0A%7C%20project%20TimeGenerated%2C%20CounterName%2C%20CounterValue%0A%7C%20summarize%20percentiles(CounterValue%2C%2090)%20by%20bin(TimeGenerated%2C%201h)%20%0A%7C%20render%20timechart%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E
Visitor

Hello everyone, 

 

I' trying to bring CPU avg(90%) of all sql databases, I started with the below kusto but  I'm sure that is not correct, I'm new at this and i'm still trying to understand it. could anyone help me with this?

I also have to do the same with DTUs and data I/O, but if you could help me with only one I may be able to get the rest

Perf
| where ObjectName =="SQLServer:Databases" and CounterName == "cpu_percent"
| project TimeGenerated, CounterName, CounterValue
| summarize avg(CounterValue, 90), bin(TimeGenerated, 10m)
| render timechart

 

Thanks.

1 Reply

@dlaurora 

 

Perf
| where ObjectName =="SQLServer:Databases" and CounterName == "cpu_percent"
| project TimeGenerated, CounterName, CounterValue
| summarize percentiles(CounterValue, 90) by bin(TimeGenerated, 1h) 
| render timechart