AWS Distro for OpenTelemetry
Install ADOT Collector by creating Task Definition through AWS console for ECS EC2 instance metrics
Install ADOT Collector by creating Task Definition through AWS console for ECS EC2 instance metrics
In this tutorial, we will demonstrate how to install ADOT Collector using Task Definition on the Amazon Elastic Container Service (Amazon ECS) through AWS console.
Go to AWS Management Console and select Elastic Container Service. From the left side navigation, select Task Definitions and click the Create new Task Definition button.
Select the EC2 as the Launch type and move forward.
Put a task-definition name (i.e.aws-otel) and select the role you created in the previous section from Taskrole drop-down menu.
For the task execution role, select the role name you created by clicking Task execution role drop-down menu.
Select Network Mode to `Bridge`Select the Task size: Mention task memory and task cpu for your task-definition like use 2048 for memory, 1024 for CPU
Go down to the last part Volumes, click the Add volume to add Volumes:
In the container definitions section, click the Add Container button. Let’s add the AWS Observability Collector container first. Put a container name (i.e. aws-otel-collector) and use the amazon/aws-otel-collector container image. We can keep everything else default
[Optional] In the 'Advanced container configuration' section, let's setup the HealthCheck instructions for aws-otel-collector. Provide the '/healthcheck' command and enter 5s as interval, 6s as Timeout, 1s as Start period, and 5 as Retries.Set up the OpenTelemetry configuration file for AWS Observability Toolkit (AOT): In the Environment Command section add
--config=/etc/ecs/otel-instance-metrics-config.yaml
to select the ECS default configuration file for AWS Observability Collector (AOC). This will collect the instance level metrics for ECS EC2 instances.Mount points setup : Go to the STORAGE AND LOGGING part, click the Add mount point to add the following points:
In the STORAGE and LOGGING section, let’s enable Auto-configure CloudWatch logs.
We are done here. Keep other config options as they are. Finish adding the container.Click the Create button in the bottom to finish the process. If everything works fine, you will see something like the following.