AWS ECS
For a much easier and more efficient way to collect and send telemetry, consider using the Logz.io telemetry collector.
Configure AWS to forward logs to Logz.io
This integration uses Fluentd in a Docker container to forward logs from your Amazon Elastic Container Service (ECS) cluster to Logz.io.
This integration refers to an EC2-based cluster. For Fargate-based cluster see our Fargate documentation.
Fluentd will fetch all existing logs, as it is not able to ignore older logs.
Automated CloudFormation deployment
Configure and create your stack
Click the button that matches your AWS region, then follow the instructions below:
AWS Region | Launch button |
---|---|
us-east-1 | ![]() |
If your region is not on the list, let us know in the repo's issues, or reach out to Logz.io support team!
####### In screen Step 1 Specify template:
Keep the defaults and click Next.
####### In screen Step 2 Specify stack details:
For Stack name you can either keep the default, or change the stack name.
For LogzioListener - choose your Logz.io listener from the list.
For LogzioToken - insert your Logz.io logs shipping token.
Click Next.
####### In screen Step 3 Configure stack options (Optional):
If you want to, you can add your custom tags, or not. Click on Next.
####### In screen Step 4 Review:
Scroll down and click on Create stack.
Give your stack a few moments to launch.
Run the task
Go to your AWS ECS page, and on the left menu, click on Task Definitions, then choose the task you just created.
Click on the Actions button, then choose Run Task.
In the Run Task screen, choose EC2 as your Launch type.
Choose the cluster you want to ship logs from.
For Placement Templates choose One Task Per Host.
Click on Run Task.
Check Logz.io for your logs
Give your logs some time to get from your system to ours, and then open Open Search Dashboards.
Manual deployment (AWS Classic Console)
Download the task definition JSON
wget https://raw.githubusercontent.com/logzio/logzio-aws-ecs/master/task-definition.json
Configure the task
In your prefered text editor, open the JSON you downloaded in the previous step and replace the following:
Paramater | Details |
---|---|
<<LOG-SHIPPING-TOKEN>> | Required. Your Logz.io account token. Replace with the token of the account you want to ship to. |
<<LISTENER-HOST>> | Required. Your Logz.io listener URL. Replace with your region's listener URL. |
Advanced settings (optional)
Since the Docker image is based on Logz.io's fluentd-docker-logs image, any of the environment variables mentioned here can be added to the task definition JSON.
Add your task definition
In your Amazon ECS Classic Console menu, go to Task Definitions and click on Create new Task Definition.
In the Step 1: Select launch type compatibility screen, choose EC2 and click Next step.
In the Step 2: Configure task and container definitions screen, scroll down and click on the Configure via JSON button.
In the text-box, delete the existing text and paste your configured task definition JSON. Press Save, then press Create.
Run the task
After the task creation, click on the Actions button, then choose Run Task.
In the Run Task screen, choose EC2 as your Launch type.
Choose the cluster you want to ship logs from.
For Placement Templates, choose One Task Per Host.
Click on Run Task.
Check Logz.io for your logs
Give your logs some time to get from your system to ours, and then open Open Search Dashboards.
Configure AWS to forward metrics to Logz.io
Deploy this integration to send your Amazon ECS metrics to Logz.io.
This integration creates a Kinesis Data Firehose delivery stream that links to your Amazon ECS metrics stream and then sends the metrics to your Logz.io account. It also creates a Lambda function that adds AWS namespaces to the metric stream, and a Lambda function that collects and ships the resources' tags.
Log in to your Logz.io account and navigate to the current instructions page inside the Logz.io app. Install the pre-built dashboard to enhance the observability of your metrics.
To view the metrics on the main dashboard, log in to your Logz.io Metrics account, and open the Logz.io Metrics tab.
Before you begin, you'll need:
- An active account with Logz.io
Create Stack in the relevant region
To deploy this project, click the button that matches the region you wish to deploy your Stack to:
Specify stack details
Specify the stack details as per the table below, check the checkboxes and select Create stack.
Parameter | Description | Required/Default |
---|---|---|
logzioListener | The Logz.io listener URL for your region. (For more details, see the regions page. For example - https://listener.logz.io:8053 | Required |
logzioToken | Your Logz.io metrics shipping token. | Required |
awsNamespaces | Comma-separated list of the AWS namespaces you want to monitor. See this list of namespaces. If you want to automatically add all namespaces, use value all-namespaces . | Required |
logzioDestination | Your Logz.io destination URL. | Required |
httpEndpointDestinationIntervalInSeconds | The length of time, in seconds, that Kinesis Data Firehose buffers incoming data before delivering it to the destination. | 60 |
httpEndpointDestinationSizeInMBs | The size of the buffer, in MBs, that Kinesis Data Firehose uses for incoming data before delivering it to the destination. | 5 |
Check Logz.io for your metrics
Give your data some time to get from your system to ours, then log in to your Logz.io Metrics account, and open the Logz.io Metrics tab.
Log in to your Logz.io account and navigate to the current instructions page inside the Logz.io app. Install the pre-built dashboard to enhance the observability of your metrics.
To view the metrics on the main dashboard, log in to your Logz.io Metrics account, and open the Logz.io Metrics tab.