Dockerfile for building Logstash
Clone or download
Latest commit 1a92bfb Mar 12, 2015
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
conf-example rename example conf Nov 18, 2014
.gitignore rename example conf Nov 18, 2014
Dockerfile add logs folder Mar 12, 2015
README.md update readme Mar 12, 2015
collectd-types.db a few fixes and added collectd input Feb 26, 2014
start_logstash.sh redirect logs to file on volume Mar 12, 2015

README.md

Logstash Dockerfile

Logstash 1.4.2

NOTE: If you want to run the whole ELK stack checkout: https://github.com/denibertovic/elk-stack-docker

Create OpenSSL certificates for secure communication with logstash-forwarder. The build will fail if no certs are present.

mkdir certs && cd certs

openssl req -x509 -batch -nodes -newkey rsa:2048 -keyout logstash-forwarder.key -out logstash-forwarder.crt

Pull from the Hub:

docker pull denibertovic/logstash

First we need to make sure Elasticsearch is running

docker run --name elasticsearch -d -t denibertovic/elasticsearch

Run logstash:

docker run --name logstash -p 5043:5043 -p 514:514 -v `pwd`/certs:/opt/certs \
    -v `pwd`/conf-example:/opt/conf --link elasticsearch:elasticsearch -i -t denibertovic/logstash

Once the service is running try and send some data to it with netcat:

netcat localhost 514
    > test
    > test
    > CTRL+C
# You should see the messages show up on logstash

Ports

514  (syslog)
5043 (lumberjack)
9292 (logstash ui)

Volumes

/opt/conf (contains logstash.conf)
/opt/certs (contains logstash forwarder certificates)