This tutorial demonstrates how to seamlessly collect and send your ECS cluster logs to Coralogix.
STEP 1. Run a new AWS ECS Task on your cluster. Select One Task per Host as the Placement Template.
STEP 2. Create a new ECS Task Definition. It is recommended to switch to the old AWS view and toggle off the New ECS Experience.
STEP 3. Go to the ECS console and choose Task Definitions > Create new task definition.
STEP 4. Under Select launch type compatibility, choose FARGATE and click Next.
STEP 5. Scroll down. Under Log router integration:
This will add a log_router container to the Containers definitions section.
STEP 6. To create a HEALTHCHECK on the log_router, use the following command:
CMD-SHELL, curl -f http://localhost:24220/api/plugins.json || exit 1
STEP 7. Add to your application container to have two containers on the list.
testapp
container in the example above):
"firelensConfiguration": { "type": "fluentd" },
with
"firelensConfiguration": { "type": "fluentd", "options": { "config-file-type": "file", "config-file-value": "/fluentd/etc/firelens.conf" } },
Need help?
Our world-class customer success team is available 24/7 to walk you through your setup and answer any questions that may come up.
Feel free to reach out to us via our in-app chat or by sending us an email at [email protected].