Skip to main content

AWS ECS

Deploy and configure the Scout Collector on ECS.

Overview​

This guide covers how to collect telemetry data (logs, metrics, and traces) from your ECS environment and send it to base14 Scout.

  • Install base14 Scout's Scout Collector using Task Defintions.
  • Configure telemetry collection for ECS Nodes.
  • Configure custom metrics endpoints
  • Implement trace collection

Prerequisites​

  • A ECS cluster
  • Aws cli setup with permissions ecs:* permissions.
  • Scout account credentials
    • Endpoint URL
    • API Key
    • Token URL
    • Application Name

Quick Start Guide​

Deploy Scout Collector in minutes by following these steps:

Task Definitions​

For Fargate, you can deploy the Scout collector in different modes:

Best for: Centralized telemetry collection and processing

  • Runs as a standalone REPLICA service
  • Collects telemetry from multiple applications and AWS services
  • Ideal for collecting metrics from RDS, ElastiCache, Amazon MQ, and application traces

Download the required files:

curl -o task-definition.json \
https://raw.githubusercontent.com/base-14/docs/main/configs/ecs/fargate/task-definition.json

curl -o scout-agent-collector-config.yaml \
https://raw.githubusercontent.com/base-14/docs/main/configs/ecs/fargate/scout-collector-config.yaml
warning
  • This service mode collector can include receivers for AWS services (RDS, ElastiCache, Amazon MQ) and external databases.
  • Replace the clientId, clientSecret, Endpoint, and TokenUrl placeholders with actual values.
  • Review the configuration to add or remove pipelines based on your monitoring needs.
  • Visit docs.base14.io for more details on the configuration.

Store Configuration in AWS Secrets Manager​

# Create secret for service collector configuration
aws secretsmanager create-secret \
--name "/ecs/scout/otelcol-service-config" \
--description "Scout OTEL Service Collector Configuration for Fargate" \
--secret-string file://scout-agent-collector-config.yaml

If the secret already exists, update it:

aws secretsmanager update-secret \
--secret-id "/ecs/scout/otelcol-service-config" \
--secret-string file://scout-agent-collector-config.yaml

Generate Task Definition​

export AWS_TASK_EXECUTION_ROLE=<ARN of the task execution Role>

AWS_TASK_EXECUTION_ROLE=${AWS_TASK_EXECUTION_ROLE} \
TASK_NAME='Scout_service_collector' \
SERVICE_NAME='Scout_service_collector' \
SECRET_NAME='/ecs/scout/otelcol-service-config' \
envsubst < task-definition.json > scout-service-collector-task-definition.json

Deploy Service​

aws ecs create-service \
--cluster <cluster-name> \
--service-name scout-service-collector \
--task-definition scout-service-collector-task-definition \
--scheduling-strategy REPLICA \
--desired-count 1 \
--launch-type FARGATE

Update IAM Permissions​

Ensure your ECS Task Execution Role has permission to access the secrets (adjust resources based on your selected deployment mode):

{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": ["secretsmanager:GetSecretValue"],
"Resource": [
"arn:aws:secretsmanager:<aws-region>:<aws-account-id>:secret:/ecs/scout/otelcol-service-config*",
"arn:aws:secretsmanager:<aws-region>:<aws-account-id>:secret:/ecs/scout/otelcol-sidecar-config*"
]
}
]
}

That's it you are done, Go to the Scout Grafana Dashboards to see the data flowing

Was this page helpful?