日志分析表架构中的Azure警报

时间:2019-12-17 16:47:02

标签: azure azure-log-analytics azure-diagnostics azure-alerts

由于日志表records will start dropping的列限制为500,我试图在Log Analytics的AzureDiagnostic表中的列> 400时触发警报。

问题是警报期望和AggregatedValue和TimeGenerated。由于这是一个架构,因此不会生成真正的时间。我尝试使用“时间”指标,将列重命名为“ TimeGenerated”,但出现以下错误:

  

搜索查询应包含“ AggregatedValue”和“ bin(TimeGenerated,   [roundTo])'表示公制警报类型

这是我有的警报查询

AzureDiagnostics
|  getschema
| summarize AggregatedValue = count(ColumnName) by bin(1d, 5m) 
|project AggregatedValue, TimeGenerated=Column1

我得到这些结果:
enter image description here

2 个答案:

答案 0 :(得分:0)

我更改了逻辑以返回记录或不返回记录。仅当达到400列的阈值,然后将我的警报阈值设置为> 0时,它才会返回一条记录。

AzureDiagnostics
|  getschema
| summarize count(ColumnName) 
| where count_ColumnName >400

警告: enter image description here

答案 1 :(得分:0)

我来自Azure Monitor Log Analytics团队。我们正在积极地使用Azure Log Analytics来避免一切。我们现在正在努力为大多数Azure资源提供专用的表,以免过多填充AzureDiagnostics表。某些Azure资源(例如Azure数据工厂)具有控制使用专用表还是使用AzureDiagnistcs的选项。请参见此处的#4:https://docs.microsoft.com/en-us/azure/data-factory/monitor-using-azure-monitor#monitor-data-factory-metrics-with-azure-monitor

相关问题