删除临时自动缩放 EC2 内存指标

Delete temporary autoscaling EC2 memory metrics

我正在使用不可变部署。

我已经包含了 http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/mon-scripts.html 中提到的脚本,以在自动缩放级别监控 ec2 内存。

现在创建临时自动缩放 cloudwatch 指标的每个部署。

删除临时自动缩放后如何删除它们?

或者如何删除部署时创建的 cloudwatch 指标。

这是因为每次部署时我的指标列表都会增加。

无法从 Amazon CloudWatch 中删除指标。指标最终会轮换出来。

是的,这会增加指标列表,但通常 AWS 用户会要求特定的指标过滤器,因此 CloudWatch 实际存储了多少不同的指标并不重要。

来自CloudWatch FAQs

  • Data points with a period of less than 60 seconds are available for 3 hours. These data points are high-resolution custom metrics.
  • Data points with a period of 60 seconds (1 minute) are available for 15 days
  • Data points with a period of 300 seconds (5 minute) are available for 63 days
  • Data points with a period of 3600 seconds (1 hour) are available for 455 days (15 months)

Data points that are initially published with a shorter period are aggregated together for long-term storage. For example, if you collect data using a period of 1 minute, the data remains available for 15 days with 1-minute resolution. After 15 days this data is still available, but is aggregated and is retrievable only with a resolution of 5 minutes. After 63 days, the data is further aggregated and is available with a resolution of 1 hour. If you need availability of metrics longer than these periods, you can use the GetMetricStatistics API to retrieve the datapoints for offline or different storage.