【发布时间】:2019-02-13 06:13:43
【问题描述】:
我有以下 Auto Scaling 策略,它应该在 CPU 预留超过 75% 时添加实例。我没有看到任何为此设置触发的警报
Policy type:
Simple scaling
Execute policy when:
ECS-CPUHighAlarm
breaches the alarm threshold: CPUReservation > 75 for 5 consecutive periods
of 60 seconds for the metric dimensions AutoScalingGroupName = ECS-
ECSAutoScalingGroup
Take the action:
Add 1 instances And then wait: 600 seconds before allowing another scaling
activity
以下是 CloudFormation 脚本。
CPUHighAlarm:
Type: 'AWS::CloudWatch::Alarm'
Properties:
EvaluationPeriods: 5
Statistic: Average
Threshold: 75
AlarmDescription: 'Alarm if CPU reservation is high.'
Period: 60
AlarmActions:
- !Ref 'CPUScalingUpPolicy'
Namespace: 'AWS/ECS'
Dimensions:
- Name: AutoScalingGroupName
Value: !Ref 'ECSAutoScalingGroup'
ComparisonOperator: GreaterThanThreshold
MetricName: CPUReservation
但根据我在下面给出的图表中观察到的情况,它并没有发生。 CPU Reservation Chart
对我缺少配置的地方有什么想法吗?
【问题讨论】:
-
是无法横向扩展还是没有触发警报?
-
没有触发警报也没有横向扩展
-
能否在 AutoScalingGroup 属性模板上显示 MetricsCollection 值?
-
目前没有在模板中指定 MetricsCollection。它是否默认发送所有指标?
标签: autoscaling aws-ecs