AWS Distro for OpenTelemetry
Build Collector as RPM
Build Collector as RPM
Run ADOT Collector on Amazon EC2 Linux
To run ADOT Collector on Amazon EC2 Linux host, you can choose to install ADOT Collector RPM on your host by the following steps.
Steps,
- Login on AWS Linux EC2 host and download aws-otel-collector source code and build RPM file with the following command.
git clone https://github.com/aws-observability/aws-otel-collector.gitmake package-rpm
Alternatively, you can also choose to download the ADOT Collector rpm package directly from S3:
1. Login on Amazon Linux 2 EC2 host and download ADOT Collector installation file.```wget https://aws-otel-collector.s3.amazonaws.com/amazon_linux/amd64/latest/aws-otel-collector.rpm```2. (Optional) Verify the package integrity.```wget https://aws-otel-collector.s3.amazonaws.com/aws-otel-collector.gpgsudo rpm --import aws-otel-collector.gpgrpm --checksig aws-otel-collector.rpm```If the package is verified correctly, you'll see output similar to:```aws-otel-collector.rpm: digests signatures OK```However, if you see output like:```aws-otel-collector.rpm: digests SIGNATURES NOT OK```You should stop, and try download the rpm package from the official source again.
- Install aws-otel-collector RPM by the following command on the host
sudo rpm -Uvh ./aws-otel-collector.rpm
Once RPM is installed, it will create ADOT Collector in directory
/opt/aws/aws-otel-collector/
We provided a control script to manage ADOT Collector. Customer can use it to Start, Stop and Check Status of ADOT Collector.
- Start ADOT Collector with CTL script. The config.yaml is optional, if it is not provided the default config will be applied.
sudo /opt/aws/aws-otel-collector/bin/aws-otel-collector-ctl -c </path/config.yaml> -a start- Stop the running ADOT Collector when finish the testing.
sudo /opt/aws/aws-otel-collector/bin/aws-otel-collector-ctl -a stop- Check the status of ADOT Collector
sudo /opt/aws/aws-otel-collector/bin/aws-otel-collector-ctl -a statusTest the data with the running ADOT Collector on EC2. you can run the following command on EC2 host. (Docker app has to be pre-installed)
docker run --rm -it -e "OTEL_OTLP_ENDPOINT=172.17.0.1:4317" -e "otlp_instance_id=test_insance_rpm" -e "OTEL_RESOURCE_ATTRIBUTES=service.namespace=ADOTCollectorRPMDemo,service.name=ADOTCollectorRPMDemoService" -e S3_REGION=us-west-2 aottestbed/aws-otel-collector-sample-app:java-0.1.0
View Your Metrics You should now be able to view your metrics in your CloudWatch console. In the navigation bar, click on Metrics. The collected ADOT Collector metrics can be found in the ADOTCollectorRPMDemo/ADOTCollectorRPMDemoService namespace.
Installing ADOT Collector via CloudFormation
See this section for detailed information on installing ADOT Collector via CloudFormation on EC2.
Install ADOT Collector on ECS EC2
See this section for detailed information on installing ADOT Collector on ECS.