Two Logstash instances on same Docker container
Am wondering if there is a way two
logstash processes with separate configurations can be run on a single
My setup has a Logstash process using file as input sending events to Redis and from there to second Logstash process and over to custom http process. So,
Logstash --> Redis --> Logstash --> Http. Was hoping to keep the two Logstash instances and Redis on the same Docker container. Am still new to Docker & Would highly appreciate any inputs / feedback on the same.
One Solution collect form web for “Two Logstash instances on same Docker container”
This would be more complicated than it needs to be. It is much simpler in the Docker world to run three containers to do three things than to run one container that does them all. It is possible though-
You need to run an init process in your container to control multiple processes, and launch that as your container’s entry point. The init will have to know how to launch the processes you are interested in, both logstash and the redis. Basimage/phusion provides an image with a good init system, but the launch scripts are based on runit and can be hard to pick up.
If you wanted to only run a single process, you can use a docker-compose file to launch all three processes and link them together.