I want to graph older metrics that are no longer listed on the Amazon CloudWatch console. How can I do this?
If data isn't published for more than 14 days, then a metric no longer appears on the CloudWatch console and can't be retrieved using ListMetrics. You can no longer search for this metric to graph it. To view the metric, you must manually provide the metric source.
The example in this article shows you how to view metrics for a terminated Amazon Elastic Compute Cloud (Amazon EC2) instance.
Note: Before you begin, check that you have the correct NameSpace, Metric Name and all the Dimensions associated with that metric. A metric is a unique combination of Namespace, MetricName, and Dimension. Note that metric values are case sensitive.
- Open the CloudWatch console.
- In the navigation pane, in the Metrics section, choose All metrics.
- Choose Source, and then enter the JSON block for the metric that you want to graph. This example graphs the CPUUtilization metric of an instance that was terminated 15 days ago:
[ "AWS/EC2", "CPUUtilization", "InstanceId", "i-abc123456789" ]
- If there are multiple dimensions in the metric that you want to graph, be sure to include them in the metrics section using this format:
[ "NameSpace", "MetricName", "Dimension Key", "Dimension Value" ]
- To graph multiple metrics, add a comma after the end bracket if there isn't one already. Then, add this to the metrics section:
["NameSpace1", "MetricName1", "Dimension Key1", "Dimension Value1"], ["NameSpace2", "MetricName2", "Dimension Key2, "Dimension Value2"]
- After you add the JSON to graph your metric, choose
Graph metrics. You can now adjust the
Adding old metrics to a graph