共用方式為


AppServiceHTTPLogs 數據表的查詢

如需在 Azure 入口網站 中使用這些查詢的詳細資訊,請參閱Log Analytics教學課程。 如需 REST API,請參閱 查詢

App Service 健康情況

App Service 健康情況的時間序列(間隔超過 5 分鐘)。

AppServiceHTTPLogs 
| summarize (count() - countif(ScStatus >= 500)) * 100.0 / count() by bin(TimeGenerated, 5m), _ResourceId
| render timechart 

失敗分類

將所有導致 5xx 的要求分類。

AppServiceHTTPLogs 
//| where ResourceId = "MyResourceId" // Uncomment to get results for a specific resource Id when querying over a group of Apps
| where ScStatus >= 500
| reduce by strcat(CsMethod, ':\\', CsUriStem)

要求的回應時間

每個 App Service 平均和 90、95 和 99 百分位數響應時間(以毫秒為單位)。

AppServiceHTTPLogs 
| summarize avg(TimeTaken), percentiles(TimeTaken, 90, 95, 99) by _ResourceId

前5名用戶端

產生流量的前 5 個用戶端。

AppServiceHTTPLogs
| top-nested of _ResourceId by dummy=max(0), // Display results for each resource (App)
  top-nested 5 of UserAgent by count()
| project-away dummy // Remove dummy line from the result set

前 5 部機器

產生流量的前 5 部機器。

AppServiceHTTPLogs
| top-nested of _ResourceId by dummy=max(0), // Display results for each resource (App)
  top-nested 5 of CIp by count()
| project-away dummy // Remove dummy line from the result set