Skip to content

Commit

Permalink
Enables ASG metrics collection in Cloudwatch (#24)
Browse files Browse the repository at this point in the history
* Allow enabling cloudwatch auto scaling group metrics collection for HA mode

* Metrics collection for ASG

---------

Co-authored-by: Denis Vazhenin <[email protected]>
  • Loading branch information
RaJiska and denvazh authored Jun 17, 2024
1 parent 072271b commit db1fa75
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,4 +112,4 @@ module "fck-nat" {
| <a name="output_security_group_id"></a> [security\_group\_id](#output\_security\_group\_id) | Deprecated. The ID of the security group used by fck-nat ENIs |
| <a name="output_security_group_ids"></a> [security\_group\_ids](#output\_security\_group\_ids) | List of security group IDs used by fck-nat ENIs |
| <a name="output_subnet_id"></a> [subnet\_id](#output\_subnet\_id) | Subnet ID to which the fck-nat instance is deployed into |
| <a name="output_vpc_id"></a> [vpc\_id](#output\_vpc\_id) | VPC ID to which the fck-nat instance is deployed into |
| <a name="output_vpc_id"></a> [vpc\_id](#output\_vpc\_id) | VPC ID to which the fck-nat instance is deployed into |
23 changes: 23 additions & 0 deletions asg.tf
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,29 @@ resource "aws_autoscaling_group" "main" {
}
}

enabled_metrics = [
"GroupMinSize",
"GroupMaxSize",
"GroupDesiredCapacity",
"GroupInServiceInstances",
"GroupPendingInstances",
"GroupStandbyInstances",
"GroupTerminatingInstances",
"GroupTotalInstances",
"GroupInServiceCapacity",
"GroupPendingCapacity",
"GroupStandbyCapacity",
"GroupTerminatingCapacity",
"GroupTotalCapacity",
"WarmPoolDesiredCapacity",
"WarmPoolWarmedCapacity",
"WarmPoolPendingCapacity",
"WarmPoolTerminatingCapacity",
"WarmPoolTotalCapacity",
"GroupAndWarmPoolDesiredCapacity",
"GroupAndWarmPoolTotalCapacity"
]

timeouts {
delete = "15m"
}
Expand Down

0 comments on commit db1fa75

Please sign in to comment.