autoscaling
This commit is contained in:
parent
0fa568fbe1
commit
d37963d628
@ -272,7 +272,7 @@ def put_scaling_policies(autoscaling_client, asg_arn):
|
||||
PolicyType='SimpleScaling',
|
||||
AdjustmentType='ChangeInCapacity',
|
||||
ScalingAdjustment=1,
|
||||
Cooldown=90
|
||||
Cooldown=60
|
||||
)
|
||||
|
||||
print(f"Scale policy created with ARN: {up['PolicyARN']}")
|
||||
@ -284,7 +284,7 @@ def put_scaling_policies(autoscaling_client, asg_arn):
|
||||
PolicyType='SimpleScaling',
|
||||
AdjustmentType='ChangeInCapacity',
|
||||
ScalingAdjustment=-1,
|
||||
Cooldown=90
|
||||
Cooldown=60
|
||||
)
|
||||
|
||||
print(f"Scale policy created with ARN: {down['PolicyARN']}")
|
||||
@ -296,7 +296,7 @@ def create_cloudwatch_alarms(cloudwatch_client, sp_up, sp_down):
|
||||
AlarmName=f"{PREFIX}-scale-alarm",
|
||||
ComparisonOperator='GreaterThanThreshold',
|
||||
EvaluationPeriods=1,
|
||||
MetricName='RequestCount',
|
||||
MetricName='RequestCountPerTarget',
|
||||
Namespace='AWS/ApplicationELB',
|
||||
Period=60,
|
||||
Statistic='Sum',
|
||||
@ -318,7 +318,7 @@ def create_cloudwatch_alarms(cloudwatch_client, sp_up, sp_down):
|
||||
AlarmName=f"{PREFIX}-scale-down-alarm",
|
||||
ComparisonOperator='LessThanThreshold',
|
||||
EvaluationPeriods=1,
|
||||
MetricName='RequestCount',
|
||||
MetricName='RequestCountPerTarget',
|
||||
Namespace='AWS/ApplicationELB',
|
||||
Period=60,
|
||||
Statistic='Average',
|
||||
|
Loading…
Reference in New Issue
Block a user