在Timestamp上添加Where条件会产生奇数聚合结果

问题描述 投票:0回答:1

我是第一次查看Azure Monitor查询,并且无法理解添加此行的原因:

| where timestamp <= ago(1days)

使查询结果“解除聚合”。

2个独立查询/结果的屏幕截图:

期望的输出

Desired output

不受欢迎的输出

Undesired output

azure-log-analytics azure-monitoring
1个回答
2
投票

您应该使用的运算符是timestamp> = previous(1d),它应该选择具有最后24小时时间戳的行。

以下是样本

requests
| where timestamp >= ago(1d)
| summarize C = count() by itemType

资源管理器中的输出,其中包含查询中的时间戳

requests
| summarize C = count() by itemType

资源管理器输出,时间范围为时间范围

Documentation reference for using ago()

希望这可以帮助 !

© www.soinside.com 2019 - 2024. All rights reserved.