Elastic Container Service (ECS)
Telemetry from Elastic Container Service (ECS) clusters of types Fargate, EC2 or External can be brought into OpsVerse ObserveNow using an OpenTelemetry sidecar deployment. The sidecar is a lightweight container that runs in each application container of your ECS cluster and collects observability data and forwards it to ObserveNow.
Logs from ECS services are collected using AWS firelens log driver and AWS for fluentbit logs forwarder. The log forwarder is run as an additional container within the same service (aka sidecar container).
Add the following block to your task definition under the containerDefinitions section and redeploy your services. Update the value of awslogs-region to the right region.
Change the app container's LogConfiguration section to the following:
The Opsverse logs endpoint and logs password are available on the OpsVerse admin console.
Logs collected from ECS can be viewed under the Explore section of the Grafana that is part of ObserveNow. All logs have the label job=fluenbit added to them. This label can be used to easily search for the ECS logs.
Container metrics and distributed traces can be collected using the Open Telemetry collector deployed as a sidecar container.
The oterl-collector sidecar configuration is managed using a parameter in AWS Parameter Store. Create a new parameter named /ecs/opsverse/otelcol.yaml with the following configuration:
The sidecar container needs to have access to the AWS Parameter Store and Cloudwatch logs, add the following policies to the ecsTaskExecution role
- AmazonSSMReadOnlyAccess
- CloudWatchLogsFullAccess
Update the task definition to run a sidecar container to run the OpenTelemetry image ( otel/opentelemetry-collector-contrib:0.105.0) with the config created above and redeploy the task definition to start seeing data from your ECS cluster in ObserveNow.
Add the following to the ContainerDefinitions section of the task definition:
Edit awslogs-region as required and redeploy the ECS service.
Metrics collected from ECS can be viewed under the Explore section of the Grafana that is part of ObserveNow.
The above steps install a otel collector that can receive distributed traces from task deployed in ECS. Follow the steps mentioned in the Application section of the documentation to instrument apps using OpenTelemetry. Here are some language specific doc pages:
Following env variables need to be added to the app's container def:
For more detailed info about insturmenting using Open Telemetry, please refer to the official Open Telemtry this documentation.