Soru

Zorluk: OrtaCloudWatch Dashboards and Container Insights

A SysOps Administrator is tasked with enabling Amazon CloudWatch Container Insights for an existing Amazon ECS cluster that runs tasks on both Amazon EC2 and AWS Fargate. The Administrator must also ensure that any new ECS clusters created in the account in the future will automatically have Container Insights enabled.

Which of the following actions should the Administrator take to meet these requirements? (Select TWO.)

  1. Run the aws ecs update-cluster-settings command, specifying the cluster name and setting containerInsights to enabled.Cevap
  2. Run the aws ecs put-account-setting-default command, setting the name parameter to containerInsights and the value to enabled.Cevap
  3. C
    Deploy the Amazon CloudWatch agent as an Amazon ECS daemon service on the EC2 instances in the cluster.
  4. D
    Configure the Amazon ECS container agent on the EC2 instances by setting the ECS_ENABLE_CONTAINER_METRICS environment variable to true in the ecs.config file.
  5. E
    Update the task definitions of the services to include the containerInsights parameter set to true within the container definitions.

Cevap

Run the aws ecs update-cluster-settings command to enable Container Insights on the existing cluster, and run the aws ecs put-account-setting-default command to enable it by default for any new clusters.
To enable Container Insights on an existing cluster, the update-cluster-settings command with the containerInsights setting set to enabled must be executed. To ensure that newly created clusters inherit this setting automatically, the put-account-setting-default command should be used with the containerInsights setting set to enabled.

Adım Adım Çözüm

1
Enable Container Insights on the existing Amazon ECS cluster.
The existing cluster starts collecting and reporting Container Insights metrics to CloudWatch.
This is done using the aws ecs update-cluster-settings CLI command with the containerInsights setting set to enabled.
2
Set the default account-level behavior for newly created clusters.
Any new clusters created in the future will automatically inherit the Container Insights enabled setting.
This is done using the aws ecs put-account-setting-default CLI command, which applies a default cluster setting configuration account-wide.

Anahtar Kavram

Configuring Container Insights for Amazon ECS at both the cluster-specific and account-default levels.
Bu soruyu puanla