简体   繁体   English

设置 CloudWatch 警报以检查 DynamoDB 项目

[英]Setting a CloudWatch alarm to check for DynamoDB items

I want to setup an alarm which would raise an alert in case there are any items in the DyanamoDB table.我想设置一个警报,如果 DyanamoDB 表中有任何项目,它会发出警报。 The alarm has been setup in the following manner -警报已按以下方式设置 -

在此处输入图片说明

My understanding is that -我的理解是——

  1. Period defines how regularly the data point is recorded in this case, a datapoint per minute. Period 定义在这种情况下记录数据点的频率,每分钟一个数据点。
  2. Maximum statistic means that we select the maximum value of RecordedItemCount in a minute.最大统计意味着我们在一分钟内选择 RecordedItemCount 的最大值。
  3. 2 out of 5 would mean that from the last 5 datapoint (5 minutes), if 2 of them are in ALARM, the state of the alarm would change. 5 分之 2 表示从最后 5 个数据点(5 分钟)开始,如果其中 2 个处于 ALARM 状态,则警报状态将发生变化。

However I am not seeing the intended results.但是我没有看到预期的结果。 I can only see a single datapoint (instead of a datapoint every minute?) in the chart and the state is OK even when the datapoint is above the threshold?我只能在图表中看到一个数据点(而不是每分钟一个数据点?),即使数据点高于阈值,状态是否正常?

Could someone help out with this?有人可以帮忙吗?

I figured out that this was the intended behaviour.我发现这是预期的行为。 As per the documentation for ReturnedItemCount -根据 ReturnedItemCount 的文档-

在此处输入图片说明

This metric would only record a datapoint if the Query/Scan operation was performed on the table during a given time interval.如果在给定的时间间隔内对表执行了查询/扫描操作,则此指标将仅记录数据点。 It isn't a periodic check unlike some of the other metrics available on CloudWatch.与 CloudWatch 上可用的其他一些指标不同,它不是定期检查。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM