查找具有先前设置实例预热时间的扩缩策略 - Amazon A EC2 uto Scaling

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

查找具有先前设置实例预热时间的扩缩策略

要确定您的策略是否有为 EstimatedInstanceWarmup 设置的自己的预热时间,请使用 AWS CLI运行以下 describe-policies 命令。Replace(替换) my-asg 使用您的 Auto Scaling 群组的名称。

aws autoscaling describe-policies --auto-scaling-group-name my-asg --query 'ScalingPolicies[?EstimatedInstanceWarmup!=`null`]'

下面是示例输出。

[ { "AutoScalingGroupName":"my-asg", "PolicyName":"cpu50-target-tracking-scaling-policy", "PolicyARN":"arn", "PolicyType":"TargetTrackingScaling", "StepAdjustments":[], "EstimatedInstanceWarmup":120, "Alarms":[{ "AlarmARN": "arn:aws:cloudwatch:us-west-2:123456789012:alarm:TargetTracking-my-asg-AlarmHigh-fc0e4183-23ac-497e-9992-691c9980c38e", "AlarmName": "TargetTracking-my-asg-AlarmHigh-fc0e4183-23ac-497e-9992-691c9980c38e" }, { "AlarmARN": "arn:aws:cloudwatch:us-west-2:123456789012:alarm:TargetTracking-my-asg-AlarmLow-61a39305-ed0c-47af-bd9e-471a352ee1a2", "AlarmName": "TargetTracking-my-asg-AlarmLow-61a39305-ed0c-47af-bd9e-471a352ee1a2" }], "TargetTrackingConfiguration":{ "PredefinedMetricSpecification":{ "PredefinedMetricType":"ASGAverageCPUUtilization" }, "TargetValue":50.0, "DisableScaleIn":false }, "Enabled":true }, ... additional policies ... ]