KQL 查询 - 在 where 子句中相对选择今天的数据

use*_*980 3 azure-log-analytics kql azure-monitor

我需要一种方法来在 Azure Monitor 中选择“自午夜以来”的数据集 - 例如相对于当天。

使用 ago(1d) 显然不能解决问题:)

StorageBlobLogs
    | where TimeGenerated > ago(1d) and StatusText contains "success"
Run Code Online (Sandbox Code Playgroud)

干杯

Yon*_*i L 6

你可以尝试使用startofday().

例如:... | where TimeGenerated > startofday(now())