Public | Automated Build

Last pushed: 2 years ago
Short Description
Short description is empty for this repo.
Full Description

Dockstash

A logstash in a docker, that generates the config files using the value of the environment variables you give with the -e flag of docker or other means.

Building / pulling

docker@boot2docker:~$ docker build -t dockstash bitbucket.org/B2Boost/rabbitelasticdockstash
or
docker@boot2docker:~$ docker pull b2boost/rabbitelasticdockstash

Launching

To forward the logs from RabbitMQ to Elastic:

docker run -d --name rabbittoelastic rabbittoelasticdockstash

You can add the --configtest flag in logstash to check if the config is right.
The environment variables must be passed as in the example:
With the environment variables you should have something like:

docker@boot2docker:~$ docker run -e "LOG4J_HOST=$LOG4J_HOST" -e "RABBITMQ_EXCHANGE=$RABBITMQ_EXCHANGE" -e "RABBITMQ_EXCHANGE_TYPE=$RABBITMQ_EXCHANGE_TYPE" -e "RABBITMQ_HOST=$RABBITMQ_HOST" -e "RABBITMQ_PASSWORD=$RABBITMQ_PASSWORD" -e "RABBITMQ_USER=$RABBITMQ_USER" -e "RABBITMQ_VHOST=$RABBITMQ_VHOST" -e "ELASTICSEARCH_INDEX=$ELASTICSEARCH_INDEX" -e "ELASTICSEARCH_HOST=$ELASTICSEARCH_HOST" -e "ELASTICSEARCH_PORT=$ELASTICSEARCH_PORT" -e "ELASTICSEARCH_USER=$ELASTICSEARCH_USER" -e "ELASTICSEARCH_PASSWORD=$ELASTICSEARCH_PASSWORD" --rm -it rabbittoelasticdockstash

Docker Pull Command
Owner
b2boost
Source Repository

Comments (1)
helain
2 years ago

This Docker contains a Logstash instance that forwards logs from RabbitMQ to Elasticsearch. The configuration file is generated at run using the value of the environment variables to avoid hard-coding passwords and user names in the configuration and to promote re-usability.

Learn more about the original Dockstash at https://github.com/HelainSchoonjans/Dockstash and about the Rabbit-Elastic Dockstash at https://bitbucket.org/B2Boost/rabbitelasticdockstash/src/8dc2f218b7df?at=master.