Giter Site home page Giter Site logo

elk-dee's Introduction

Docker Enterprise Edition integration with ELK

Summary: Easy to use configuration for running and integrating ELK stack with Docker Enterprise Edition. The goal here is to ship docker engine and container/service logs to ELK. This can be done using the following steps:

Step 1 On a separate/dedicated node for ELK (recommended to be outside of the Docker EE cluster), run the following:

$ docker swarm init # this would allow us to run services on this node
$ git clone https://github.com/nicolaka/elk-dee.git
$ cd elk-dee
$ docker stack deploy -c elk-docker-compose.yml elk

Step 2: Set up Docker cluster logging

You need to set up Docker daemon logging configuration to default to using journald. The reason we're doing this is to ensure that you can have a local copy of the logs to be able to use docker logs and docker service logs.

This is the recommended logging configuration to place in/etc/docker/daemon.json:

{
  "log-driver": "journald",
  "log-level": "debug",
  "log-opts": {
    "tag":"{{.ImageName}}/{{.Name}}/{{.ID}}"
  }
}

Make sure you restart or SIGHUP the Docker daemon after you change these configs.

Step 3 Stream all Docker logs to ELK

This is done using a tool called journalbeat. A modified version of it that we're using to work with Docker can be found here.

We will run journalbeat as a global service in our Docker cluster. This requires that you configure Step 2 before hand.

On one of the Docker manager nodes run the following:

$ git clone https://github.com/nicolaka/elk-dee.git
$ cd elk-dee
$ export LOGSTASH_HOST=<ELK NODE IP or DNS>
$ docker stack deploy -c journalbeat-docker-compose.yml journalbeat

Step 4: Proceed to access Kibana at http://<ELK_IP_ADDRESS>:5601. Enjoy!

elk-dee's People

Contributors

nicolaka avatar ahromis avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.