根据搜索表达式创建CloudWatch警报

根据搜索表达式创建CloudWatch警报

本文介绍了根据搜索表达式创建CloudWatch警报的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试执行以下操作:

I'm attempting to the do the following:

我有一个DynamoDB全局表,该表发布了ReplicationLatency指标.我想在为每个区域发布的ReplicationLatency指标的聚合上创建一个警报.

I have a DynamoDB global table which publishes the ReplicationLatency metric. I want to create an alarm on the aggregate of the ReplicationLatency metric published for each region.

DDB表副本存在于us-east-1,us-west-2和us-west-1中.在为每个接收区域定义CW警报时,我假设我可以搜索一个表达式.例如,这是我在CloudWatch控制台中看到的表达式.

The DDB table replicas exist in us-east-1, us-west-2 and us-west-1. In defining the CW alarm for each receiving region, I was under the assumption that I could a search expression. For example, here's the expression I see in the CloudWatch console.

SEARCH('{AWS/DynamoDB,ReceivingRegion,TableName} MetricName="ReplicationLatency"', 'Average', 300)

我想创建一个指标数学警报,它是上述搜索结果指标的平均值.我正在尝试创建以下格式的度量标准数学表达式:

I'd like to create a metric math alarm which is the avg of the metrics of the above search result. I was attempting to create a metric math expression of the format:

AVG(METRICS())

然后出现以下错误-警报的表达式必须至少包含一个度量.之前有人尝试过通过搜索表达式创建警报吗?如果是,您能否阐明如何完成?

I then get the following error - The expression for an alarm must include at least one metric. Has anybody attempted to create an alarm from a search expression before? If yes, could you shed some light on how it can be done?

我能想到的解决此问题的另一种方法是枚举/添加每个接收区域的ReplicationLatency指标,然后从中创建一个指标数学表达式.这似乎完全破坏了具有搜索表达式并根据所有这些指标创建警报的目的.

The only other way I can think of solving this problem is to enumerate/add the ReplicationLatency metric for each receiving region and then create a metric math expression out of that. That's seems to completely defeat the purpose of having a search expression and creating an alarm from all those metrics.

推荐答案

您目前无法在搜索表达式上发出警报.

You cannot do alarms on search expressions at the moment.

您将必须手动添加要报警的所有指标,然后使用上面指定的数学函数.

You will have to add manually all the metrics you want to alarm on and then use the math function you specified above.

这篇关于根据搜索表达式创建CloudWatch警报的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-02 07:03