-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(asg): Collect all ASG level metrics
Collect all ASG level metrics as standard. These metrics should come at no extra cost. See https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-metrics.html. To collect a subset instead, use the escape hatch mechanism: ```ts declare const asg: AutoScalingGroup; const cfnAsg = asg.node.defaultChild as CfnAutoScalingGroup; cfnAsg.metricsCollection = [ { granularity: "1Minute", metrics: [ // A subset of metrics ], }, ]; ```
- Loading branch information
Showing
3 changed files
with
29 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- | ||
"@guardian/cdk": minor | ||
--- | ||
|
||
feat(asg) Collect all ASG level metrics | ||
|
||
This change should have no cost impact: | ||
|
||
> Group metrics are available at one-minute granularity at no additional charge, but you must enable them. | ||
> – https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-metrics.html. | ||
If it does, or if you only want a subset, the escape hatch mechanism can be used: | ||
|
||
```ts | ||
declare const asg: AutoScalingGroup; | ||
|
||
const cfnAsg = asg.node.defaultChild as CfnAutoScalingGroup; | ||
|
||
cfnAsg.metricsCollection = [ | ||
{ | ||
granularity: "1Minute", | ||
metrics: [ | ||
// A subset of metrics | ||
], | ||
}, | ||
]; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters