

# Amazon CloudWatch metrics for Amazon EC2 Auto Scaling
<a name="ec2-auto-scaling-metrics"></a>

Amazon EC2 Auto Scaling publishes the following metrics in the `AWS/AutoScaling` namespace. The actual Auto Scaling group metrics made available will depend on whether you have group metrics enabled, and which group metrics you enabled. Group metrics are available at one-minute granularity at no additional charge, but you must enable them.

When you enable Auto Scaling group metrics, Amazon EC2 Auto Scaling sends sampled data to CloudWatch every minute on a best-effort basis. In rare cases when CloudWatch experiences a service disruption, data isn't backfilled to fill gaps in group metric history.

**Topics**
+ [

## Auto Scaling group metrics
](#as-group-metrics)
+ [

## Dimensions for Auto Scaling group metrics
](#as-group-metric-dimensions)
+ [

## Predictive scaling metrics and dimensions
](#predictive-scaling-metrics)
+ [

## Enable Auto Scaling group metrics (console)
](#as-enable-group-metrics)
+ [

## Enable Auto Scaling group metrics (AWS CLI)
](#as-enable-group-metrics-cli)

## Auto Scaling group metrics
<a name="as-group-metrics"></a>

With these metrics, you get nearly continuous visibility into the history of your Auto Scaling group, such as changes in the size of the group over time.


| Metric | Description | 
| --- | --- | 
|  GroupMinSize  |  The minimum size of the Auto Scaling group. **Reporting criteria**: Reported if metrics collection is enabled.  | 
|  GroupMaxSize  |  The maximum size of the Auto Scaling group. **Reporting criteria**: Reported if metrics collection is enabled.  | 
|  GroupDesiredCapacity  |  The number of instances that the Auto Scaling group attempts to maintain. **Reporting criteria**: Reported if metrics collection is enabled.  | 
|  GroupInServiceInstances  |  The number of instances that are running as part of the Auto Scaling group. This metric does not include instances that are pending or terminating. **Reporting criteria**: Reported if metrics collection is enabled.  | 
|  GroupPendingInstances  |  The number of instances that are pending. A pending instance is not yet in service. This metric does not include instances that are in service or terminating. **Reporting criteria**: Reported if metrics collection is enabled.  | 
|  GroupStandbyInstances  |  The number of instances that are in a `Standby` state. Instances in this state are still running but are not actively in service. **Reporting criteria**: Reported if metrics collection is enabled.  | 
|  GroupTerminatingInstances  |  The number of instances that are in the process of terminating. This metric does not include instances that are in service, pending, or returning to a warm pool after Auto Scaling group scale in. **Reporting criteria**: Reported if metrics collection is enabled.  | 
|  GroupTerminatingRetainedInstances  |  The number of instances in the `Terminating:Retained` state. **Reporting criteria**: Reported if metrics collection is enabled.  | 
|  GroupTotalInstances  |  The total number of instances in the Auto Scaling group. This metric identifies the number of instances that are in service, pending, and terminating. **Reporting criteria**: Reported if metrics collection is enabled.  | 

When you configure a mixed instances group to measure its desired capacity in different units, such as by assigning weights based on the vCPU count of each instance type, the following metrics count the number of units used by your Auto Scaling group. If you did not configure a mixed instances group to measure its desired capacity in different units, then the following metrics are populated, but are equal to the metrics that are defined in the previous table. For more information, see [Setup overview for creating a mixed instances group](mixed-instances-groups-set-up-overview.md). 


| Metric | Description | 
| --- | --- | 
|  GroupInServiceCapacity  |  The number of capacity units that are running as part of the Auto Scaling group.  **Reporting criteria**: Reported if metrics collection is enabled.  | 
|  GroupPendingCapacity  |  The number of capacity units that are pending.  **Reporting criteria**: Reported if metrics collection is enabled.  | 
|  GroupStandbyCapacity  |  The number of capacity units that are in a `Standby` state. **Reporting criteria**: Reported if metrics collection is enabled.  | 
|  GroupTerminatingCapacity  |  The number of capacity units that are in the process of terminating.  **Reporting criteria**: Reported if metrics collection is enabled.  | 
|  GroupTerminatingRetainedCapacity  |  The capacity units represented by instances in the `Terminating:Retained` state. **Reporting criteria**: Reported if metrics collection is enabled.  | 
|  GroupTotalCapacity  |  The total number of capacity units in the Auto Scaling group. **Reporting criteria**: Reported if metrics collection is enabled.  | 

Amazon EC2 Auto Scaling also reports the following metrics for Auto Scaling groups that have a warm pool. For more information, see [Decrease latency for applications with long boot times using warm pools](ec2-auto-scaling-warm-pools.md).


| Metric | Description | 
| --- | --- | 
|  WarmPoolMinSize  |  The minimum size of the warm pool.  **Reporting criteria**: Reported if metrics collection is enabled.  | 
|  WarmPoolDesiredCapacity  |  The amount of capacity that Amazon EC2 Auto Scaling attempts to maintain in the warm pool.  This is equivalent to the maximum size of the Auto Scaling group minus its desired capacity, or, if set, as the maximum prepared capacity of the Auto Scaling group minus its desired capacity. However, when the minimum size of the warm pool is equal to or greater than the difference between the maximum size (or, if set, the maximum prepared capacity) and the desired capacity of the Auto Scaling group, then the warm pool desired capacity will be equivalent to the `WarmPoolMinSize`. **Reporting criteria**: Reported if metrics collection is enabled.  | 
|  WarmPoolPendingCapacity  |  The amount of capacity in the warm pool that is pending. This includes instances returning to a warm pool after Auto Scaling group scale in. This metric does not include instances that are running, stopped, or terminating. **Reporting criteria**: Reported if metrics collection is enabled.  | 
|  WarmPoolPendingRetainedCapacity  |  Tracks retained instances returning to the warm pool. **Reporting criteria**: Reported if metrics collection is enabled.  | 
|  WarmPoolTerminatingCapacity  |  The amount of capacity in the warm pool that is in the process of terminating. This metric does not include instances that are running, stopped, or pending.  **Reporting criteria**: Reported if metrics collection is enabled.  | 
|  WarmPoolTerminatingRetainedCapacity  |  Tracks retained instances terminating from the warm pool. **Reporting criteria**: Reported if metrics collection is enabled.  | 
|  WarmPoolWarmedCapacity  |  The amount of capacity available to enter the Auto Scaling group during scale out. This metric does not include instances that are pending or terminating.  **Reporting criteria**: Reported if metrics collection is enabled.  | 
|  WarmPoolTotalCapacity  |  The total capacity of the warm pool, including instances that are running, stopped, pending, or terminating.  **Reporting criteria**: Reported if metrics collection is enabled.  | 
|  GroupAndWarmPoolDesiredCapacity  |  The desired capacity of the Auto Scaling group and the warm pool combined. **Reporting criteria**: Reported if metrics collection is enabled.  | 
|  GroupAndWarmPoolTotalCapacity  |  The total capacity of the Auto Scaling group and the warm pool combined. This includes instances that are running, stopped, pending, terminating, or in service.  **Reporting criteria**: Reported if metrics collection is enabled.  | 

## Dimensions for Auto Scaling group metrics
<a name="as-group-metric-dimensions"></a>

You can use the following dimensions to refine the metrics listed in the previous tables.


| Dimension | Description | 
| --- | --- | 
|  AutoScalingGroupName  |  Filters on the name of an Auto Scaling group.  | 

## Predictive scaling metrics and dimensions
<a name="predictive-scaling-metrics"></a>

The `AWS/AutoScaling` namespace includes the following metrics for predictive scaling. 

Metrics are available with a resolution of one hour.

You can evaluate forecast accuracy by comparing forecasted values with actual values. For more information about evaluating forecast accuracy using these metrics, see [Monitor predictive scaling metrics with CloudWatch](monitor-predictive-scaling-cloudwatch.md).


| Metric | Description | Dimensions | 
| --- | --- | --- | 
|  PredictiveScalingLoadForecast  |  The amount of load that's anticipated to be generated by your application. The `Average`, `Minimum`, and `Maximum` statistics are useful, but the `Sum` statistic is not.  **Reporting criteria**: Reported after the initial forecast is created.  | AutoScalingGroupName, PolicyName, PairIndex  | 
| PredictiveScalingCapacityForecast |  The anticipated amount of capacity needed to meet application demand. This is based on the load forecast and target utilization level at which you want to maintain your Auto Scaling instances. The `Average`, `Minimum`, and `Maximum` statistics are useful, but the `Sum` statistic is not. **Reporting criteria**: Reported after the initial forecast is created.  | AutoScalingGroupName, PolicyName | 
| PredictiveScalingMetricPairCorrelation |  The correlation between the scaling metric and the per-instance average of the load metric. Predictive scaling assumes high correlation. Therefore, if you observe low value for this metric, it's better not to use a metric pair. The `Average`, `Minimum`, and `Maximum` statistics are useful, but the `Sum` statistic is not. **Reporting criteria**: Reported after the initial forecast is created.  | AutoScalingGroupName, PolicyName, PairIndex | 

**Note**  
The `PairIndex` dimension returns information associated with the index of the load-scaling metric pair as assigned by Amazon EC2 Auto Scaling. Currently, the only valid value is `0`. 

## Enable Auto Scaling group metrics (console)
<a name="as-enable-group-metrics"></a>

**To enable group metrics**

1. Open the Amazon EC2 console at [https://console.aws.amazon.com/ec2/](https://console.aws.amazon.com/ec2/), and choose **Auto Scaling Groups** from the navigation pane.

1. Select the check box next to your Auto Scaling group.

   A split pane opens up in the bottom of the page. 

1. On the **Monitoring** tab, select the **Auto Scaling group metrics collection**, **Enable** check box located at the top of the page under **Auto Scaling**. 

**To disable group metrics**

1. Open the Amazon EC2 console at [https://console.aws.amazon.com/ec2/](https://console.aws.amazon.com/ec2/), and choose **Auto Scaling Groups** from the navigation pane.

1. Select your Auto Scaling group.

1. On the **Monitoring** tab, clear the **Auto Scaling group metrics collection**, **Enable** check box. 

## Enable Auto Scaling group metrics (AWS CLI)
<a name="as-enable-group-metrics-cli"></a>

**To enable Auto Scaling group metrics**  
Enable one or more group metrics by using the [enable-metrics-collection](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/autoscaling/enable-metrics-collection.html) command. For example, the following command enables a single metric for the specified Auto Scaling group.

```
aws autoscaling enable-metrics-collection --auto-scaling-group-name my-asg \
  --metrics GroupDesiredCapacity --granularity "1Minute"
```

If you omit the `--metrics` option, all metrics are enabled.

```
aws autoscaling enable-metrics-collection --auto-scaling-group-name my-asg \
  --granularity "1Minute"
```

**To disable Auto Scaling group metrics**  
Use the [disable-metrics-collection](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/autoscaling/disable-metrics-collection.html) command to disable all group metrics.

```
aws autoscaling disable-metrics-collection --auto-scaling-group-name my-asg
```