若要監控和檢查執行個體重新整理的狀態 (AWS CLI)
使用下列 describe-instance-refreshes 命令。
aws autoscaling describe-instance-refreshes --auto-scaling-group-name my-asg
下列為範例輸出。
執行個體重新整理會依開始時間排序。首先說明仍在進行中的執行個體重新整理。
{
"InstanceRefreshes":[
{
"InstanceRefreshId":"08b91cf7-8fa6-48af-b6a6-d227f40f1b9b",
"AutoScalingGroupName":"my-asg",
"Status":"InProgress",
"StatusReason":"Waiting for instances to warm up before continuing. For example: i-0645704820a8e83ff is warming up.",
"StartTime":"2023-11-24T16:46:52+00:00",
"PercentageComplete":50,
"InstancesToUpdate":0,
"Preferences":{
"MaxHealthyPercentage":120,
"MinHealthyPercentage":90,
"InstanceWarmup":60,
"SkipMatching":false,
"AutoRollback":true,
"ScaleInProtectedInstances":"Ignore",
"StandbyInstances":"Ignore"
}
},
{
"InstanceRefreshId":"0e151305-1e57-4a32-a256-1fd14157c5ec",
"AutoScalingGroupName":"my-asg",
"Status":"Successful",
"StartTime":"2023-11-22T13:53:37+00:00",
"EndTime":"2023-11-22T13:59:45+00:00",
"PercentageComplete":100,
"InstancesToUpdate":0,
"Preferences":{
"MaxHealthyPercentage":120,
"MinHealthyPercentage":90,
"InstanceWarmup":60,
"SkipMatching":false,
"AutoRollback":true,
"ScaleInProtectedInstances":"Ignore",
"StandbyInstances":"Ignore"
}
}
]
}
您可以檢視群組的擴展活動,進一步監控進行中活動的成功或失敗。擴展活動也可協助您深入探索更多詳細資訊,以協助您疑難排解執行個體重新整理的問題。如需詳細資訊,請參閱疑難排解 Amazon EC2 Auto Scaling 中的問題。