Kueri untuk tabel AzureMetrics
Bagan pai kode respons HTTP
Perincian kode respons untuk setiap metrik, selama 12 jam terakhir.
AzureMetrics
| where TimeGenerated > ago(12h)
| where MetricName in ("Http2xx", "Http3xx", "Http4xx", "Http5xx")
| summarize sum(Total) by MetricName
| render piechart
Bagan garis waktu respons
Rangkaian waktu waktu respons rata-rata (lebih dari interval 5 menit).
AzureMetrics
| extend timeBin = bin(TimeGenerated, 5m)
| summarize ResponseTime = sumif(Average, MetricName=="AverageResponseTime") by timeBin, bin(TimeGenerated, 1h)
| sort by TimeGenerated desc
| render timechart
[Klasik] Temukan Di AzureMetrics
[Klasik] Temukan di AzureMetrics untuk mencari nilai tertentu dalam tabel AzureMetrics./nNote bahwa kueri ini memerlukan pembaruan <parameter SeachValue> untuk menghasilkan hasil
// This query requires a parameter to run. Enter value in SearchValue to find in table.
let SearchValue = "<SearchValue>";//Please update term you would like to find in the table.
AzureMetrics
| where * contains tostring(SearchValue)
| take 1000
Metrik terbaru
Tampilkan laporan metrik terbaru untuk setiap metrik yang dilaporkan.
AzureMetrics
| summarize arg_max(TimeGenerated, UnitName, Total, Count, Maximum, Minimum, Average) by MetricName
Temukan Di AzureMetrics
Temukan di AzureMetrics untuk mencari nilai tertentu dalam tabel AzureMetrics./nNote bahwa kueri ini memerlukan pembaruan <parameter SeachValue> untuk menghasilkan hasil
// This query requires a parameter to run. Enter value in SearchValue to find in table.
let SearchValue = "<SearchValue>";//Please update term you would like to find in the table.
AzureMetrics
| where * contains tostring(SearchValue)
| take 1000
Grafik lalu lintas ExpressRoute Circuit BitsInPerSecond
Grafik lalu lintas BitsInPerSecond (satu jam terakhir).
AzureMetrics
| where MetricName == "BitsInPerSecond"
| summarize by Average, bin(TimeGenerated, 1h), Resource
| render timechart
Grafik lalu lintas ExpressRoute Circuit BitsOutPerSecond
Grafik lalu lintas BitsOutPerSecond (satu jam terakhir).
AzureMetrics
| where MetricName == "BitsOutPerSecond"
| summarize by Average, bin(TimeGenerated, 1h), Resource
| render timechart
Grafik ArpAvailablility Sirkuit ExpressRoute
Grafik lalu lintas untuk ArpAvailability (5 menit).
AzureMetrics
| where MetricName == "ArpAvailability"
| summarize by Average, bin(TimeGenerated, 5m), Resource
| render timechart
Ketersediaan BGP Sirkuit ExpressRoute
Grafik lalu lintas untuk BgpAvailability (5 menit).
AzureMetrics
| where MetricName == "BgpAvailability"
| summarize by Average, bin(TimeGenerated, 5m), Resource
| render timechart
Penggunaan CPU rata-rata
Rata-rata penggunaan CPU dalam satu jam terakhir berdasarkan nama sumber daya.
//consistently high averages could indicate a customer needs to move to a larger SKU
AzureMetrics
| where ResourceProvider == "MICROSOFT.SQL" // /DATABASES
| where TimeGenerated >= ago(60min)
| where MetricName in ('cpu_percent')
| parse _ResourceId with * "/microsoft.sql/servers/" Resource // subtract Resource name for _ResourceId
| summarize CPU_Maximum_last15mins = max(Maximum), CPU_Minimum_last15mins = min(Minimum), CPU_Average_last15mins = avg(Average) by Resource , MetricName
Pemecahan masalah performa
Berpotensi mengkueri atau kebuntuan pada sistem yang dapat menyebabkan performa buruk.
//potentially a query or deadlock on the system that could lead to poor performance
AzureMetrics
| where ResourceProvider == "MICROSOFT.SQL"
| where TimeGenerated >=ago(60min)
| where MetricName in ('deadlock')
| parse _ResourceId with * "/microsoft.sql/servers/" Resource // subtract Resource name for _ResourceId
| summarize Deadlock_max_60Mins = max(Maximum) by Resource, MetricName
Memuat Data
Memantau pemuatan data dalam satu jam terakhir.
AzureMetrics
| where ResourceProvider == "MICROSOFT.SQL"
| where TimeGenerated >= ago(60min)
| where MetricName in ('log_write_percent')
| parse _ResourceId with * "/microsoft.sql/servers/" Resource// subtract Resource name for _ResourceId
| summarize Log_Maximum_last60mins = max(Maximum), Log_Minimum_last60mins = min(Minimum), Log_Average_last60mins = avg(Average) by Resource, MetricName
Jumlah koneksi P2S
Jumlah koneksi P2S aktif selama 30 hari terakhir.
AzureMetrics
| where TimeGenerated > ago(30d)
| where MetricName == "P2SConnectionCount"
| summarize by Maximum, bin(TimeGenerated,1h), Resource
| render timechart
Pemanfaatan bandwidth P2S
Pemanfaatan bandwidth P2S rata-rata selama 12 jam terakhir dalam bit/detik.
AzureMetrics
| where TimeGenerated > ago(24h)
| where MetricName == "P2SBandwidth"
| summarize by Average, bin(TimeGenerated, 1h), Resource
| render timechart
Throughput gateway
Throughput gateway agregat dalam Byte/detik.
AzureMetrics
| where TimeGenerated > ago(24h)
| where MetricName == "AverageBandwidth"
| summarize by Average, bin(TimeGenerated, 1h), Resource
| render timechart
Perlihatkan log dari tabel AzureMetrics
Lists log terbaru dalam tabel AzureMetrics, diurutkan menurut waktu (terbaru terlebih dahulu).
AzureMetrics
| top 10 by TimeGenerated
Perlihatkan log dari tabel AzureMetrics
Lists log terbaru dalam tabel AzureMetrics, diurutkan menurut waktu (terbaru terlebih dahulu).
AzureMetrics
| top 10 by TimeGenerated
Ketersediaan kluster (KeepAlive)
Tampilkan ketersediaan kluster selama satu jam terakhir.
// To create an alert for this query, click '+ New alert rule'
AzureMetrics
| where ResourceProvider == "MICROSOFT.KUSTO"
| where TimeGenerated > ago(1d)
| where MetricName == "KeepAlive"
| parse _ResourceId with * "providers/microsoft.kusto/clusters/" cluster_name // Get the cluster name from the ResourceId string
| summarize heartbeat_count = count() by bin(TimeGenerated, 30m), cluster_name // bin is used to set the time grain to 30 minutes
| extend alive=iff(heartbeat_count > 0, true, false)
| sort by TimeGenerated asc // sort the results by time (ascending order)
Saran dan Komentar
https://aka.ms/ContentUserFeedback.
Segera hadir: Sepanjang tahun 2024 kami akan menghentikan penggunaan GitHub Issues sebagai mekanisme umpan balik untuk konten dan menggantinya dengan sistem umpan balik baru. Untuk mengetahui informasi selengkapnya, lihat:Kirim dan lihat umpan balik untuk