0
votes

I currently have a bunch of custom metric's based in multiple regions across our AWS account.

I thought I was going crazy but have now confirmed that the metric I created a while ago is expiring when not used for a certain time period (could be 2 weeks).

Here's my setup. I create a new metric on my log entry - which has no expiry date; enter image description here

I then go to the main page on CloudWatch --> then to Metrics to view any metrics (I understand this will only display new metric hits when there are hits that match the metric rule).

About 2 weeks ago, I had 9 Metrics logged under my "Custom Namespaces", and I now have 8 - as if it does not keep all the data: enter image description here

As far as i'm aware, all my metrics should stay in place (unless I remove them), however, it seems as though if these are not hit consistently, the data "expires", is that correct? If so, how are you meant to track historical data?

Thanks

1
How often are these custom metrics pushed to cloudwatch? like every minute or every 5 minutes every 15 minutes?helloV
@helloV Based off the graph metric, I have tried multiple. However, I don't think this is what you are asking, how can I check this? The Metric Value is set to 1Hexie

1 Answers

3
votes

CloudWatch will remove metrics from search if there was no new data published for that metric in the last 2 weeks.

This is mentioned in passing in the FAQ for EC2 metrics, but I think it applies to all metrics.

From 'will I lose the metrics data if I disable monitoring for an Amazon EC2 instance question' in the FAQ:

CloudWatch console limits the search of metrics to 2 weeks after a metric is last ingested to ensure that the most up to date instances are shown in your namespace.

Your data is still there however. Data adheres to a different retention policy.

You can still get your data if you know what the metric name is. If you added your metric to a dashboard, it will still be visible there. You can use CloudWatch PutDashboards API to add the metric to a dashboard or use CloudWatch GetMetricStatistics API to get the raw data.