class GroupMetric
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.AutoScaling.GroupMetric |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsautoscaling#GroupMetric |
Java | software.amazon.awscdk.services.autoscaling.GroupMetric |
Python | aws_cdk.aws_autoscaling.GroupMetric |
TypeScript (source) | aws-cdk-lib » aws_autoscaling » GroupMetric |
Group metrics that an Auto Scaling group sends to Amazon CloudWatch.
Example
declare const vpc: ec2.Vpc;
declare const instanceType: ec2.InstanceType;
declare const machineImage: ec2.IMachineImage;
// Enable monitoring of all group metrics
new autoscaling.AutoScalingGroup(this, 'ASG', {
vpc,
instanceType,
machineImage,
// ...
groupMetrics: [autoscaling.GroupMetrics.all()],
});
// Enable monitoring for a subset of group metrics
new autoscaling.AutoScalingGroup(this, 'ASG', {
vpc,
instanceType,
machineImage,
// ...
groupMetrics: [new autoscaling.GroupMetrics(autoscaling.GroupMetric.MIN_SIZE, autoscaling.GroupMetric.MAX_SIZE)],
});
Initializer
new GroupMetric(name: string)
Parameters
- name
string
Properties
Name | Type | Description |
---|---|---|
name | string | The name of the group metric. |
static DESIRED_CAPACITY | Group | The number of instances that the Auto Scaling group attempts to maintain. |
static IN_SERVICE_INSTANCES | Group | 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. |
static MAX_SIZE | Group | The maximum size of the Auto Scaling group. |
static MIN_SIZE | Group | The minimum size of the Auto Scaling group. |
static PENDING_INSTANCES | Group | 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. |
static STANDBY_INSTANCES | Group | The number of instances that are in a Standby state Instances in this state are still running but are not actively in service. |
static TERMINATING_INSTANCES | Group | The number of instances that are in the process of terminating This metric does not include instances that are in service or pending. |
static TOTAL_INSTANCES | Group | The total number of instances in the Auto Scaling group This metric identifies the number of instances that are in service, pending, and terminating. |
name
Type:
string
The name of the group metric.
static DESIRED_CAPACITY
Type:
Group
The number of instances that the Auto Scaling group attempts to maintain.
static IN_SERVICE_INSTANCES
Type:
Group
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.
static MAX_SIZE
Type:
Group
The maximum size of the Auto Scaling group.
static MIN_SIZE
Type:
Group
The minimum size of the Auto Scaling group.
static PENDING_INSTANCES
Type:
Group
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.
static STANDBY_INSTANCES
Type:
Group
The number of instances that are in a Standby state Instances in this state are still running but are not actively in service.
static TERMINATING_INSTANCES
Type:
Group
The number of instances that are in the process of terminating This metric does not include instances that are in service or pending.
static TOTAL_INSTANCES
Type:
Group
The total number of instances in the Auto Scaling group This metric identifies the number of instances that are in service, pending, and terminating.