5

I'm adding custom filter metrics to different logs on CW Logs. Some of them were added just fine and can be added to graphs and alarms. Some other just disappear after adding no matter how often I try to add them. I understand that there is a delay involved but even after hours I'm not able to use them.

Process seems straight forward as I'm following the guides from AWS. Is there anything I'm missing?

Christoph
  • 1,965
  • 16
  • 35
  • https://stackoverflow.com/questions/44951213/cloudwatch-custom-metrics-not-working-as-expected does this help you? – ohlr Feb 19 '19 at 16:21

1 Answers1

5

For others that may come across this, some times it can take a few days for the metrics to show up if they're far into the past:

Data points with time stamps from 24 hours ago or longer can take at least 48 hours to become available for GetMetricData or GetMetricStatistics from the time they are submitted. Data points with time stamps between 3 and 24 hours ago can take as much as 2 hours to become available for for GetMetricData or GetMetricStatistics.

https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_PutMetricData.html

Ian Smith
  • 879
  • 1
  • 12
  • 23
  • 2
    It turns out to be worse than that: ["Metrics that have not had any new data points in the past two weeks do not appear in the console."](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/viewing_metrics_with_cloudwatch.html) ([SO answer](https://stackoverflow.com/a/68674842/3018750)) – rkok Jun 12 '23 at 01:49
  • @rkok Oh wow, I did not know that was a thing lol. I guess it's important to keep your metrics flowing in even if you have nothing to report? – Ian Smith Jun 13 '23 at 03:41
  • Yes indeed. There is probably some technical justification for this behaviour on AWS's side, but from a user perspective it's confusing. It only adds to my impression of CloudWatch being a very clunky tool... – rkok Jun 13 '23 at 04:18
  • I would wager it's more of a cost reduction passive consequence. The CloudWatch service as a whole deals with SO many metrics every second it's hard to imagine. – Ian Smith Jun 17 '23 at 19:45