This is a highly configurable logstash (1.4.2) image.
If you want to link to container running Elasticsearch rather than use the embedded Elasticsearch server:
$ docker run -d \
-v *yourLogstashConfFolder*:/data \
-v *yourLogsFolder*:/logs \
--link <your_es_container_name>:es \
-p 9292:9292 \
captnbp/docker-logstash
To have the linked Elasticsearch container's bind_host
and port
automatically detected, you will need to create an ES_HOST
and ES_PORT
placeholder in the elasticsearch
definition in your logstash config file. For example:
output {
elasticsearch {
bind_host => "ES_HOST"
port => "ES_PORT"
}
}
I have created an example logstash_linked.conf which includes the ES_HOST
and ES_PORT
placeholders to serve as an example.
If you are using an external Elasticsearch server rather than the embedded server or a linked container, simply provide a configuration file with the Elasticsearch endpoints already configured:
$ docker run -d \
-v *yourLogstashConfFolder*:/data \
-v *yourLogsFolder*:/logs \
-p 9292:9292 \
captnbp/docker-logstash
You can now verify the logstash installation by visiting the prebuilt logstash dashboard:
http://<your_container_ip>:9292/index.html#/dashboard/file/logstash.json
If you prefer to build from source rather than use the pblittle/docker-logstash trusted build published to the public Docker Registry, execute the following:
$ git clone https://github.com/captnbp/docker-logstash.git
$ cd docker-logstash
You can now verify the logstash installation by visiting the prebuilt logstash dashboard running in the newly created container.
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
This application is distributed under the Apache License, Version 2.0.