共用方式為


AppServiceHTTPLogs 資料表的查詢

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

App Service 健康情況

Azure 服務健康狀態的時間序列 (超過 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 個用戶端。

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