How do I automatically add CloudWatch metrics to Auto Scaling Group instances into my dashboard widget?

2 minute read
0

I want to automatically add Amazon CloudWatch metrics to AWS Auto Scaling group instances into my dashboard widget.

Short description

To automatically add CloudWatch metrics to Auto Scaling group instances, use metrics explorer.

Note: Resources that no longer exist with the specified property or tag aren't displayed in the visualization. To find the metrics for these resources, check CloudWatch metrics views. For more information, see Use metrics explorer to monitor resources by their tags and properties.

Resolution

To use metrics explorer to view metrics on the CloudWatch dashboard, complete the following steps:

  1. Open the CloudWatch console, and then choose Dashboards in the navigation page.
  2. Choose the dashboard that you want to add the metrics explorer widget to, or create a new dashboard.
  3. Choose Add Widget, and then complete the following steps:
    For Data sources types, choose CloudWatch.
    For Data type, choose Metrics.
    For Widget type, choose Explorer, and then choose Empty Explorer widget.
  4. Under Metrics, select the Amazon Elastic Compute Cloud (Amazon EC2) instance metrics that you want to monitor, such as CPUUtilization, DiskWriteBytes, and NetworkIn.
  5. Under From, choose the aws:autoscaling:groupName tag, and then choose the Auto Scaling group name.
  6. (Optional) For Aggregate by, choose a statistic that you want to use to aggregate the metrics.
  7. Under Split by, choose aws:autoscaling:groupName to show a graph based on the Auto Scaling group name.
  8. (Optional) Under Graph options, modify the time period, graph type, legend placement, and layout.
  9. Choose Save dashboard.

To turn on metrics explorer to find Amazon EC2 metrics that the CloudWatch agent publishes, manually create or edit a CloudWatch agent configuration file. Make sure that the CloudWatch agent configuration file contains the values that are specified in the CloudWatch agent configuration for metrics explorer.

Related information

Query your metrics with CloudWatch Metrics Insights

Graphing metrics

AWS OFFICIAL
AWS OFFICIALUpdated 3 months ago