【问题标题】:AppInsights Query Specific time range ESTAppInsights 查询特定时间范围 EST
【发布时间】:2021-04-23 11:06:44
【问题描述】:
我想在美国东部标准时间每天上午 7 点到晚上 10 点之间查询 appinsights 日志以获取以下查询。对此的任何帮助表示赞赏
dependencies
|where success == "False"
|where type == "Azure queue"
|where operation_Name == "XXXXTrigger"
【问题讨论】:
-
如果我的解决方案对您有启发或帮助,您能否将我的答案标记为accepted,谢谢~
-
标签:
c#
azure
azure-web-app-service
azure-monitoring
【解决方案1】:
您可以使用以下代码进行查询。您可以像下面两张图片一样更改时区。或者您可以使用new()-5h 转换EST 时间。
方法一:改变时区
dependencies
|where success == "False"
|where type == "Azure queue"
|where operation_Name == "XXXXTrigger"
|where timestamp between(todatetime(strcat(format_datetime(now(),'yyyy-MM-dd')," ",'07:00:00')) .. todatetime(strcat(format_datetime(now(),'yyyy-MM-dd')," ",'22:00:00')))
方法二:new()-5h
dependencies
|where success == "False"
|where type == "Azure queue"
|where operation_Name == "XXXXTrigger"
|where timestamp between(todatetime(strcat(format_datetime(now()-5h,'yyyy-MM-dd')," ",'07:00:00')) .. todatetime(strcat(format_datetime(now()-5h,'yyyy-MM-dd')," ",'22:00:00')))