Forum Discussion

dlaurora's avatar
dlaurora
Copper Contributor
Oct 29, 2019

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

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.

  • dlaurora 

     

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

Resources