AppInsights 查询特定时间范围 EST
AppInsights Query Specific time range EST
我想在美国东部时间每天上午 7 点到晚上 10 点之间查询 Appinsights 日志以获取以下查询。对此的任何帮助表示赞赏
dependencies
|where success == "False"
|where type == "Azure queue"
|where operation_Name == "XXXXTrigger"
您可以使用以下代码查询。您可以像下面两张图片那样更改时区。或者你可以用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')))
我想在美国东部时间每天上午 7 点到晚上 10 点之间查询 Appinsights 日志以获取以下查询。对此的任何帮助表示赞赏
dependencies
|where success == "False"
|where type == "Azure queue"
|where operation_Name == "XXXXTrigger"
您可以使用以下代码查询。您可以像下面两张图片那样更改时区。或者你可以用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')))