Coder Social home page Coder Social logo

Comments (4)

spujadas avatar spujadas commented on August 16, 2024

Hi,

The general idea is in the documentation (http://elk-docker.readthedocs.org/#extending-the-image), but I'll add some more detailed information on changing configuration files.

In essence, here are your main options:

  • You could fork the source of the image, change the config file and rebuild the image, but then you'd lose any additional goodness from future versions of the original image (unless you fork and update it on your side each time there's an upgrade).

  • You could bind-mount (see https://docs.docker.com/engine/userguide/containers/dockervolumes/) your local configuration file to a configuration file within the container at runtime (e.g. docker run ... -v /path/to/your-30-output.conf:/etc/logstash/conf.d/30-output.conf), thus enabling you to tinker with the configuration file locally and have the changes dynamically update in the running container.

  • You could also (if you're just playing around and testing things) exec into the running container and change the config files there, but that is indeed bad practice as the changes won't be persistent.

  • Once you've finalised your configuration, you could make things permanent by creating a Dockerfile that extends the original image and replaces Logstash's config file with yours (or adds new config files). Goes something like this:

    FROM seb/elk
    
    ADD /path/to/your-logstash.conf /etc/logstash/conf.d/your-logstash.conf
    

Hope that helps.

from elk-docker.

spujadas avatar spujadas commented on August 16, 2024

Closing following documentation update, feel free to reopen if still unclear.

from elk-docker.

Schabernack avatar Schabernack commented on August 16, 2024

Thanks a lot for your help Sébastien. I went with mounting the config file as a docker volume. Then, restarting with docker exec elk service logstash restart` allows me to quickly iterate different settings.

from elk-docker.

spujadas avatar spujadas commented on August 16, 2024

Cheers!

from elk-docker.

Related Issues (20)

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.