簡體   English   中英

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')))

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM