本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。
更新 Network Load Balancer 目標群組的運作狀態檢查設定
您可以隨時更新目標群組的運作狀態檢查設定。如需運作狀態檢查設定的清單,請參閱 運作狀態檢查設定。
- Console
-
更新運作狀態檢查設定
前往 https://console.aws.amazon.com/ec2/
開啟 Amazon EC2 主控台。 -
在導覽窗格的負載平衡中,選擇目標群組。
-
選擇目標群組的名稱,以開啟其詳細資訊頁面。
-
在 Health checks (運作狀態檢查) 標籤上,選擇 Edit (編輯)。
-
在編輯運作狀態檢查設定頁面上,視需要修改設定。
-
選擇儲存變更。
- AWS CLI
-
更新運作狀態檢查設定
使用 modify-target-group 命令。下列範例會更新 HealthyThresholdCount 和 HealthCheckTimeoutSeconds 設定。
aws elbv2 modify-target-group \ --target-group-arn
target-group-arn
\ --healthy-threshold-count3
\ --health-check-timeout-seconds20
- CloudFormation
-
更新運作狀態檢查設定
更新 AWS::ElasticLoadBalancingV2::TargetGroup 資源,以包含更新的運作狀態檢查設定。下列範例會更新 HealthyThresholdCount 和 HealthCheckTimeoutSeconds 設定。
Resources: myTargetGroup: Type: 'AWS::ElasticLoadBalancingV2::TargetGroup' Properties: Name: my-target-group Protocol: TCP Port: 80 TargetType: instance VpcId: !Ref myVPC HealthyThresholdCount:
3
HealthCheckTimeoutSeconds:20
檢查目標運作狀態
編輯目標群組屬性