An example of an application that uses GELF Docker logging driver to communicate with an ELK instance.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Docker GELF Logging Example

This is a really simple application that outputs random fake names using the console different methods: warn,error and log.

The output is then redirected to an ELK instance, where we can filter it by log level.

How to run it?

Install docker and docker-compose, configure the IP for your Logstash instance, then run

docker-compose up

Any ways to run an ELK instance using Docker?

Sure! I recommend you to use:

The config I'm using for Logstash is the following:

input {
        gelf {
                type => docker
                port => 5000

output {
        elasticsearch {
                hosts => "elasticsearch:9200"

Related blog post: