Soru

Zorluk: KolayCloudWatch Dashboards and Container Insights

A SysOps Administrator needs to enable Amazon CloudWatch Container Insights to collect performance metrics from an existing Amazon Elastic Container Service (Amazon ECS) cluster. Which TWO actions can the SysOps Administrator take to enable Container Insights for this cluster? (Select TWO.)

  1. Run the AWS CLI command: aws ecs update-cluster-settings --cluster <cluster-name> --settings name=containerInsights,value=enabledCevap
  2. Update the cluster settings in the Amazon ECS console by modifying the cluster properties to turn on Container Insights.Cevap
  3. C
    Enable detailed 1-minute monitoring on all Amazon EC2 launch templates used by the ECS cluster Auto Scaling group.
  4. D
    Create an Amazon EventBridge rule that triggers an AWS Systems Manager Automation document to install the CloudWatch agent on each ECS container instance.
  5. E
    Configure a CloudWatch Logs log group for the ECS cluster and set the retention period to never expire.

Cevap

To enable Amazon CloudWatch Container Insights on an existing Amazon ECS cluster, you can either execute the AWS CLI command `aws ecs update-cluster-settings` with the `containerInsights` setting enabled, or modify the cluster's settings directly within the Amazon ECS console.
To collect performance metrics at the container and task level for an existing ECS cluster, Container Insights must be enabled at the cluster level. This can be configured either visually by modifying the cluster properties within the Amazon ECS console, or programmatically by running the AWS CLI command `aws ecs update-cluster-settings` with the `name=containerInsights,value=enabled` settings parameter.

Adım Adım Çözüm

1
Determine the correct AWS management tool (CLI or Console) to modify ECS cluster configurations.
Identify that ECS cluster properties can be updated via the `aws ecs update-cluster-settings` CLI command or through the Amazon ECS console.
Container Insights is a cluster-level setting that must be activated on the target ECS cluster.
2
Select the correct settings configuration for the chosen interface.
For CLI, use `--settings name=containerInsights,value=enabled`. For Console, select the cluster and toggle the Container Insights setting to enabled.
This updates the cluster metadata and instructs the Amazon ECS container agent to begin streaming container-level metrics to CloudWatch.

Anahtar Kavram

Configuring Container Insights for Amazon ECS clusters
Bu soruyu puanla