Sign inSign up

bitbull/logger

By bitbull

•Updated over 6 years ago

Sidecar Logger with Logstash

Image
0

9.4K

bitbull/logger repository overview

⁠Docker Logger Image

This image use the "sidecar" pattern to extract logs from the main conainer sharing the logs using volume. This image is based on docker.elastic.co/logstash/logstash:6.2.3⁠ to use logstash client to accorpate all log files in a single output (sdtout).

This is a basic approch in order to push log to ElastiSearch/Kibana stack.

⁠Usage

This is an example docker-compose configuration

version: "3.0"
services:
    web:
        image: bitbull/webserver
        ports:
            - 80
        volumes:
            - logs:/var/www/html/logs
    logger:
        image: bitbull/logger
        volumes:
            - logs:/logs

volumes:
    logs:

You can notice the logs volume mounted in the main container in /var/www/html/logs path, all file in that directory is elaborate by logstash in log event and outputed in stdout with the pattern %{[host]} %{[path]} %{[message]}.

To show up the logs simply get the logs container output docker-compose logs logger

⁠Configurations

Logstash configuration are inside config directory inside this repository that simply declare pipelines in pipeline directory.

Plase refer to logstash documentation⁠ before make configuration changes.

Tag summary

Content type

Image

Digest

Size

22.7 MB

Last updated

over 8 years ago

docker pull bitbull/logger