Class GroupMetric
- Namespace
- Amazon.CDK.AWS.AutoScaling
- Assembly
- Amazon.CDK.AWS.AutoScaling.dll
Group metrics that an Auto Scaling group sends to Amazon CloudWatch.
public class GroupMetric : DeputyBase
- Inheritance
-
GroupMetric
Examples
Vpc vpc;
InstanceType instanceType;
IMachineImage machineImage;
// Enable monitoring of all group metrics
// Enable monitoring of all group metrics
new AutoScalingGroup(this, "ASG", new AutoScalingGroupProps {
Vpc = vpc,
InstanceType = instanceType,
MachineImage = machineImage,
// ...
GroupMetrics = new [] { GroupMetrics.All() }
});
// Enable monitoring for a subset of group metrics
// Enable monitoring for a subset of group metrics
new AutoScalingGroup(this, "ASG", new AutoScalingGroupProps {
Vpc = vpc,
InstanceType = instanceType,
MachineImage = machineImage,
// ...
GroupMetrics = new [] { new GroupMetrics(GroupMetric.MIN_SIZE, GroupMetric.MAX_SIZE) }
});
Remarks
ExampleMetadata: infused
Constructors
GroupMetric(string)
public GroupMetric(string name)
Parameters
name
string
Properties
DESIRED_CAPACITY
The number of instances that the Auto Scaling group attempts to maintain.
public static GroupMetric DESIRED_CAPACITY { get; }
Property Value
IN_SERVICE_INSTANCES
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.
public static GroupMetric IN_SERVICE_INSTANCES { get; }
Property Value
MAX_SIZE
The maximum size of the Auto Scaling group.
public static GroupMetric MAX_SIZE { get; }
Property Value
MIN_SIZE
The minimum size of the Auto Scaling group.
public static GroupMetric MIN_SIZE { get; }
Property Value
Name
The name of the group metric.
public virtual string Name { get; }
Property Value
PENDING_INSTANCES
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.
public static GroupMetric PENDING_INSTANCES { get; }
Property Value
STANDBY_INSTANCES
The number of instances that are in a Standby state Instances in this state are still running but are not actively in service.
public static GroupMetric STANDBY_INSTANCES { get; }
Property Value
TERMINATING_INSTANCES
The number of instances that are in the process of terminating This metric does not include instances that are in service or pending.
public static GroupMetric TERMINATING_INSTANCES { get; }
Property Value
TOTAL_INSTANCES
The total number of instances in the Auto Scaling group This metric identifies the number of instances that are in service, pending, and terminating.
public static GroupMetric TOTAL_INSTANCES { get; }