Forum Discussion
Larissa Marinho Eglem de Oliveira
Microsoft
Apr 04, 2018Use percentiles function on Azure Metrics
Hello,
I am trying to modify this default query to give me the percentiles of DTU usage for my Azure SQL Database. Any idea how I can go about that?
AzureMetrics
| where ResourceProvider=="MICROSOFT.SQL" and ResourceId contains '...'
| where MetricName=='dtu_consumption_percent'
| summarize avg = min_of(avg(Maximum), 100.0), max = min_of(max(Maximum), 100.0) by bin(TimeGenerated, time(14m))
| sort by TimeGenerated desc
| render timechart
Thank you!
- Noa Kuperberg
Microsoft
Hey Larissa,
try this query, it calculates percentiles of the "Maximum" value:
AzureMetrics | where ResourceProvider=="MICROSOFT.SQL" | where MetricName=='dtu_consumption_percent' | summarize percentiles(Maximum, 25, 50, 75, 99) by bin(TimeGenerated, time(14m)) | sort by TimeGenerated desc | render timechart
HTH,
Noa