Start TrialStart Free TrialStart Free TrialBook Your DemoSign In

Docker

Collect and ship Docker container application logs to Logstash and Elasticsearch.

Filebeat is a lightweight shipper that enables you to send your Docker container application logs to your Logit.io Stack. Configure Filebeat using the pre-defined examples below to start sending and analysing your Docker application logs.

Follow this step by step guide to get 'logs' from your system to Logit.io:

Step 1 - Install Filebeat

To get started first follow the steps below:

  • Install
  • Root access
  • Verify the required port is open

Older versions can be found here 7, 6, 5

Step 3 - Configure Filebeat.yml

The configuration file below is pre-configured to send data to your Logit.io Stack.

Copy the configuration file below and overwrite the contents of the Filebeat configuration file typically located at /etc/filebeat/filebeat.yml

# ============================== Filebeat inputs ===============================
filebeat.inputs:

- type: container

  enabled: true

  paths:
  - ''

# ================================== Outputs ===================================
output.logstash:
    hosts: ["your-logstash-host:your-ssl-port"]
    loadbalance: true
    ssl.enabled: true

It’s a good idea to run the configuration file through a YAML validator to rule out indentation errors, clean up extra characters, and check if your YAML file is valid. Yamllint.com is a great choice.

Read more about how to configure container input options

Step 4 - Validate configuration

If you have issues starting in the next step, you can use these commands below to troubleshoot.

Let's check the configuration file is syntactically correct by running directly inside the terminal. If the file is invalid, will print an error loading config file error message with details on how to correct the problem.

deb/rpm

sudo  -e -c /etc//.yml

macOS

cd <EXTRACTED_ARCHIVE>
sudo ./ -e -c .yml

Windows

cd <EXTRACTED_ARCHIVE>
.\.exe -e -c .yml

Step 5 - Start filebeat

Start or restart to apply the configuration changes.

Step 6 - Launch Logit.io to view your logs

Now you should view your data:

Launch Dashboard

If you don't see logs take a look at How to diagnose no data in Stack below for how to diagnose common issues.

Step 7 - How to diagnose no data in Stack

If you don't see data appearing in your Stack after following the steps, visit the Help Centre guide for steps to diagnose no data appearing in your Stack or Chat to support now.

Step 10 - Docker Logging Overview

Docker is a platform as a service (PaaS) tool created for building & deploying applications by using containers. Developers use these isolated containers to package an application with all of its required dependencies for streamlined deployment. Docker was first created in 2013 and offers both a free open source solution and paid offering. The platform has been instrumental in the development of cloud-native applications.

Thanks to Docker’s widespread adoption, the trend towards using microservices and containerization has become a must for developers launching applications in the cloud.

Despite this, effective log analysis using Docker’s container logs can easily spiral and run into many complications when trying to keep up with the scaling required for your growing infrastructure. Due to their isolated & distributed nature, centralising Docker log messages is often overly problematic when log data is required for further analysis.

The Logit.io platform provides a single source of truth for container monitoring and log management. We enable your teams to have complete observability across containers, enabling your Developers & IT leaders with the ability to investigate and fix issues faster.

Read more about container monitoring

If you need any more help with migrating your Docker log data to Filebeat our engineers are here to help. Feel free to get in contact with our support team by sending us a message via live chat & we'll be happy to assist.

Return to Search
Sign Up

© 2023 Logit.io Ltd, All rights reserved.