AppServiceHTTPLogs 表的查询

有关在 Azure 门户中使用这些查询的信息,请参阅 Log Analytics 教程。 有关 REST API,请参阅查询

应用程序服务运行状况

应用程序服务运行状况的时序(超过 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)

请求的响应时间

每个应用程序服务的平均 & 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