Lekérdezések az AzureMetrics-táblához
A lekérdezések Azure Portalon való használatáról további információt a Log Analytics oktatóanyagában talál. A REST API-val kapcsolatban lásd a Lekérdezést.
HTTP-válaszkódok kördiagramja
Az egyes metrikák válaszkódjainak lebontása az elmúlt 12 órában.
AzureMetrics
| where TimeGenerated > ago(12h)
| where MetricName in ("Http2xx", "Http3xx", "Http4xx", "Http5xx")
| summarize sum(Total) by MetricName
| render piechart
A válaszidők vonaldiagramja
Átlagos válaszidő idősora (több mint 5 perces időközök).
AzureMetrics
| extend timeBin = bin(TimeGenerated, 5m)
| summarize ResponseTime = sumif(Average, MetricName=="AverageResponseTime") by timeBin, bin(TimeGenerated, 1h)
| sort by TimeGenerated desc
| render timechart
[Klasszikus] Keresés az AzureMetricsben
[Klasszikus] Keresse meg az AzureMetricsben egy adott értéket az AzureMetrics táblában./nJegyzete, hogy a lekérdezéshez frissíteni kell a SeachValue> paramétert az <eredmények előállításához.
// 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
Legújabb metrikák
Az egyes jelentett metrikák legfrissebb metrikajelentéseinek megjelenítése.
AzureMetrics
| summarize arg_max(TimeGenerated, UnitName, Total, Count, Maximum, Minimum, Average) by MetricName
Keresés az AzureMetricsben
Keresse meg az AzureMetricsben egy adott értéket az AzureMetrics táblában./nJegyzete, hogy a lekérdezéshez frissíteni kell a SeachValue> paramétert az <eredmények előállításához.
// 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
ExpressRoute Circuit BitsInPerSecond forgalmi gráf
Traffic graph BitsInPerSecond (utolsó egy óra).
AzureMetrics
| where MetricName == "BitsInPerSecond"
| summarize by Average, bin(TimeGenerated, 1h), Resource
| render timechart
ExpressRoute Circuit BitsOutPerSecond forgalmi gráf
Traffic graph BitsOutPerSecond (utolsó egy óra).
AzureMetrics
| where MetricName == "BitsOutPerSecond"
| summarize by Average, bin(TimeGenerated, 1h), Resource
| render timechart
ExpressRoute Circuit ArpAvailablility graph
Forgalmi grafikon az ArpAvailability szolgáltatáshoz (5 perc).
AzureMetrics
| where MetricName == "ArpAvailability"
| summarize by Average, bin(TimeGenerated, 5m), Resource
| render timechart
Az ExpressRoute Circuit BGP rendelkezésre állása
A BgpAvailability forgalmi grafikonja (5 perc).
AzureMetrics
| where MetricName == "BgpAvailability"
| summarize by Average, bin(TimeGenerated, 5m), Resource
| render timechart
Processzorhasználat kihasználtsága
Az elmúlt órában használt processzorhasználat erőforrásnév alapján.
//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
Teljesítménnyel kapcsolatos hibaelhárítás
Potenciálisan lekérdezés vagy holtpont a rendszeren, amely gyenge teljesítményhez vezethet.
//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
Adatok betöltése
Adatbetöltés monitorozása az elmúlt órában.
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
P2S-kapcsolatok száma
Aktív P2S-kapcsolatok száma az elmúlt 30 napban.
AzureMetrics
| where TimeGenerated > ago(30d)
| where MetricName == "P2SConnectionCount"
| summarize by Maximum, bin(TimeGenerated,1h), Resource
| render timechart
P2S-sávszélesség kihasználtsága
A P2S-sávszélesség átlagos kihasználtsága az elmúlt 12 órában bit/másodpercben.
AzureMetrics
| where TimeGenerated > ago(24h)
| where MetricName == "P2SBandwidth"
| summarize by Average, bin(TimeGenerated, 1h), Resource
| render timechart
Átjáró átviteli sebessége
Az átjáró átviteli sebességének összesítése bájt/másodpercben.
AzureMetrics
| where TimeGenerated > ago(24h)
| where MetricName == "AverageBandwidth"
| summarize by Average, bin(TimeGenerated, 1h), Resource
| render timechart
Naplók megjelenítése az AzureMetrics táblából
Az AzureMetrics tábla legújabb naplóinak listája, idő szerint rendezve (a legújabb első).
AzureMetrics
| top 10 by TimeGenerated
Naplók megjelenítése az AzureMetrics táblából
Az AzureMetrics tábla legújabb naplóinak listája, idő szerint rendezve (a legújabb első).
AzureMetrics
| top 10 by TimeGenerated
Fürt rendelkezésre állása (KeepAlive)
A fürt rendelkezésre állásának megjelenítése az elmúlt órában.
// 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)