根据搜索表达式创建 CloudWatch 警报 [英] Creating a CloudWatch alarm based on a search expression

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

问题描述

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

I'm attempting to the do the following:

我有一个发布 ReplicationLatency 指标的 DynamoDB 全局表.我想针对为每个区域发布的 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 警报的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆