Logstash is an open source, server-side data processing pipeline that ingests data from a multitude of sources simultaneously, transforms it, and then sends it to your favorite 「stash.」 (Ours is Elasticsearch, naturally.) . This Docker Logstash image to provide convenient way to test your log messages from console input (stdin), parse them via json codec and finally display them on console (stdout) as well.
- Support console input immediately (input.conf)
- Support console output for debugging (output.conf)
- Based on openjdk:8-jre-slim to make docker image smaller
# interactive mode
$ docker run -it chhuang/docker_image_logstash:latest
When docker container is created. You could paste you log message on console and press ENTER key. It will parse your log message and output on console.
$ docker run \
-it -v /path/to/config_folder:/opt/logstash/config \
chhuang/docker_image_logstash:latest
Or, you could customize it on your Dockerfile:
# Dockerfile
FROM chhuang/docker_image_logstash:latest
COPY /path/to/config_folder /conf.d
$ docker build -t namespace/repo .
$ docker run namespace/repo