Giter Club home page Giter Club logo

efk-lab's Introduction

EFK in Docker Compose

This should make it easier to develop and prototype fluentd configurations and how the interact with elastic all from your local device.

Instructions

A make file is provided to make deployment pretty simple and easy. You can run make nginx or make httpd to deploy an EFK stack with a corisponding web server to generate some logs. You can also run make nginx_down or make httpd_down to remove the deployment

Generating credentials

Execute an interactive shell to the elastic container. docker exec -it elastic /bin/bash

Once you have a shell session into the elastic instance you can run the following command to generate credential information. bash bin/elasticsearch-setup-passwords auto

Copy the generated output somewhere you can return to and make sure you update kibana.yml and the fluentd config file fluent.conf. It is best to run make nginx_down or make httpd_down to remove the containers. Dont worry the credential info for elastic is saved in a docker volume that doesnt get deleted. Re-run your make command to bring everything up with the credentials. Failing to do it in this manor may create auth issues.

If you have already deployed the stack and generated the password information. Be aware the storage volume can persist making a new deployment fail due to the credentials being stored in this docker volume from a prior deployment. Just run docker volume rm esdata to scrub that storage.

Generate some logs

Before anything will show up in elastic you will need to generate the log information fluentd is listening for. A simple curl command to the web server you deployed should be enough.

Once you curl a few times, you can head over to the elastic instance localhost:5601 and log in with the elastic user and the generated password.

In elastic you will have to create a data view for the fluentd logs http://localhost:5601/app/management/kibana/dataViews and name the index pattern fluentd-*

If you receive and error or there is nothing to display, there might be something wrong with auth on any of the machines in the stack, just remove all containers and redeploy.

efk-lab's People

Contributors

markdpierce avatar

Stargazers

Mahdi Azari avatar

Watchers

 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.