记录集为空时触发警报 Application Insights 警报规则查询

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

我正在尝试基于 Kusto 查询在 Application Insights 中创建警报规则。

如果结果集为空,我想触发警报。

如果我将警报逻辑设置为:

operater = Equal To and the Threshold Value = 0,

它不起作用。 在我看来这是正确的,它不起作用,但我无法检查“空”。

也许有人有解决方案?

提前致谢。

azure azure-application-insights kql
2个回答
0
投票

我已经在我的环境中复制并得到如下预期结果,我遵循了Microsoft-Document

创建警报规则时:

enter image description here

选择自定义日志搜索后,键入查询:

 AzureActivity | where false

enter image description here

然后在下一部分等于然后阈值为 0:

enter image description here

问题可能出在您创建警报的操作部分。

enter image description here

输出:

enter image description here

enter image description here

enter image description here

我按照微软的文档得到了警报,请尝试按照一定会得到警报的过程


0
投票

您可以基于 Kusto 查询在 Application Insights 中创建警报规则,并在结果集为空时触发警报。为此,您可以在 Kusto 查询中使用“计数”聚合函数来计算查询返回的行数。如果计数为零,那么您可以触发警报。

your_kusto_query_here |数

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