skip to Main Content

I try to work with custom CloudWatch Metrics. Pushing metrics thorugh aws-go-sdk-v2 works fine but I have an issue working with the metrics in the web UI. My workload only runs every once every 24h but in the web ui I can only query for metrics in the last 3h hours it seems.

https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch-metrics-insights-limits.html also says Currently, you can query only the most recent three hours of data.

Do I have to post process the data somehow to get a historical view of the data? Since I can set the graph to 1w time window I suspect there must be a way to achieve this. Any ideas what I am missing?

2

Answers


  1. CloudWatch retains metric data as follows:

    • 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)

    Ref: https://aws.amazon.com/cloudwatch/faqs/#:~:text=CloudWatch%20retains%20metric%20data%20as,are%20available%20for%2015%20days

    This means your metrics are still available, for 15 months to be exactly, which you can check out in the Cloudwatch console, section Metrics > All Metrics. This will show you a graph of all the data collected, you need to adjust the time interval and period of your metrics.

    If you want to query your metrics, you can only do it with 3 hour more recent data (even if your metrics are still in Cloudwatch), you cannot use metric insights on older data.

    Login or Signup to reply.
  2. If you need to retrieve your metrics using CloudWatch Metrics Insights, please note that currently we only support receiving no more than 3 hours of your data.

    Since you need to search metric names and retrieve data for an interval longer than 3 hours, I would recommend using the regular search syntax, or plot your metrics individually.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search