Why isn't my metric available in the CloudWatch console?

Lesedauer: 3 Minute
0

Why isn't my custom metric available in the Amazon CloudWatch console?

Resolution

Metrics can be event-driven or schedule-based:

  • With event-driven metrics, the source sends data points only when there's something to report. For example, a data point is sent to the HTTTP_CODE_ELB_5XX_COUNT metric from the Elastic Load Balancing service only when there are errors. See the source service's documentation for reporting criteria details.
  • With schedule-based metrics, the source sends data to CloudWatch periodically, irrespective of the value of the data point. For example, the Amazon Elastic Compute Cloud (Amazon EC2) service pushes data periodically for the CPUUtilization metric.

A metric is available in the CloudWatch console only if a data point was pushed to the metric in the last 14 days. The CloudWatch console limits the search of metrics to two weeks after the metric is last ingested so that only the most recent metrics appear. If a metric is newly created, it might take up to 15 minutes for the metric name to appear in the console.

If your metric isn't available in the CloudWatch console, try the following methods to retrieve your data points:

  • Use the AWS Command Line Interface (AWS CLI) or AWS SDK to make a GetMetricData or GetMetricStatistics API call for the metric. Be sure to specify the correct namespace, metric name, dimensions, and timeframe.
    Note: If you receive errors when running AWS CLI commands, make sure that you’re using the most recent AWS CLI version.
  • Select any metric on the Metric page of the CloudWatch console. Then, edit the browser URL to include the namespace, metric name, and dimension of the metric that's not listed in the console.
  • Select any metric on the Metric page of the CloudWatch console. Then, choose the Source tab to view a JSON object containing the metric array that defines the namespace, name, and dimensions of the selected metric. Edit the namespace, metric name, or dimensions. Finally, choose Update to view the metric that's not listed in the console.

Note: CloudWatch applies the following retention settings on its data points. Consider these settings when specifying the "period" to retrieve a metric:

  • 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 minutes) are available for 63 days.
  • Data points with a period of 3,600 seconds (1 hour) are available for 455 days (15 months).

You can create alarms on metrics that aren't available in the CloudWatch console using either of the following methods:

  • Use the AWS CLI or AWS SDK to make a PutMetricAlarm API call. Be sure to use the correct namespace, metric name, and dimensions for the metric.
  • During the first step ("Specify metric and conditions") of creating a CloudWatch alarm in the console, you can edit the Metric Name and Dimension values. However, you can't edit the key names for the dimension and namespace using this method. To edit the namespace, choose Edit, and then choose the Source tab in the metric widget. Update the namespace, and then choose Update.

AWS OFFICIAL
AWS OFFICIALAktualisiert vor 2 Jahren