Azure日志分析-如何查看过去x天但仅在特定时间段内的日志?

Azure日志分析-如何查看过去x天但仅在特定时间段内的日志?,azure,azure-log-analytics,azure-data-explorer,azure-application-gateway,kql,Azure,Azure Log Analytics,Azure Data Explorer,Azure Application Gateway,Kql,我想查看过去x天内app gateway 500的错误日志。但是对于x个天数,我只希望看到UTC 11:00到13:00之间的日志。我该怎么做?这是我到目前为止得到的,但它不起作用 AzureDiagnostics | where TimeGenerated > ago(7d) and TimeGenerated between (datetime(11:00:00) .. datetime(13:00:00)) | where ResourceType == "APPLICAT

我想查看过去x天内app gateway 500的错误日志。但是对于x个天数,我只希望看到UTC 11:00到13:00之间的日志。我该怎么做?这是我到目前为止得到的,但它不起作用

AzureDiagnostics
| where TimeGenerated > ago(7d) and TimeGenerated between (datetime(11:00:00) .. datetime(13:00:00))
| where ResourceType == "APPLICATIONGATEWAYS" and httpStatus_d > 499
| where host_s == "my.website.com"
| summarize count() by clientIP_s, bin(TimeGenerated, 5m)
显然,第二个like(Timegenerated)是错误的。有人能告诉我怎么做吗


谢谢

您可以使用
hourofday()

例如:

AzureDiagnostics
| where TimeGenerated > ago(7d)
| where hourofday(TimeGenerated) between (11 .. 12) // 11:00 AM -> 12:59 PM
| where host_s == "my.website.com"
| where ResourceType == "APPLICATIONGATEWAYS"
| where httpStatus_d > 499
| summarize count() by clientIP_s, bin(TimeGenerated, 5m)