Azure Application Insights中的每小时平均使用量

Dou*_*oug 4 azure-application-insights

我可以让Application Insights显示每小时运行的使用情况日志,但是有没有一种方法可以按小时显示平均使用情况,以了解一天中必须使用网站的什么时间?

Joh*_*ner 6

在您的资源概览刀片上,是否没有指标浏览器可以准确显示这一点?最近24小时(按小时)?如果这不是您的意思,则可以进行分析查询以获取所需的内容,例如

requests 
| where timestamp > ago(7d) 
| extend hour = datepart("hour", timestamp)
| summarize sum(itemCount)/7 by hour
| order by hour asc
| render barchart
Run Code Online (Sandbox Code Playgroud)

该数据将显示过去7天的请求,每24小时除以7,以显示您的平均每天的请求。

如果您只想要它的“今天”版本,它甚至更简单:

requests
| where timestamp > ago(1d) 
| summarize sum(itemCount) by bin(timestamp, 1h)
| render timechart
Run Code Online (Sandbox Code Playgroud)

您可以在分析网站上查询的所有内容,然后都可以固定为天蓝色仪表板上的图块。