Skip to content

Instantly share code, notes, and snippets.

@kevinsimper
Last active October 4, 2016 14:36
Show Gist options
  • Select an option

  • Save kevinsimper/cec7b5be51e30c09e076f81c96eaa31c to your computer and use it in GitHub Desktop.

Select an option

Save kevinsimper/cec7b5be51e30c09e076f81c96eaa31c to your computer and use it in GitHub Desktop.
Elk tutorial
docker run -d --name elastic -p 9200:9200 elasticsearch
Check port 9200
docker run -d --name logstash -v $PWD/logstash:/etc/logstash/conf.d -v $PWD/test.log:/host/var/log/test.log --link elastic logstash logstash -f /etc/logstash/conf.d --debug
docker run -d --name kibana -p 5601:5601 --link elastic -e ELASTICSEARCH_URL=http://elastic:9200 kibana
test.log:
example
input.conf:
input {
file {
type => "test"
path => [
"/host/var/log/test.log"
]
}
}
output.conf:
output {
elasticsearch {
host => ["elastic"]
protocol => "http"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment