Skip to content

Instantly share code, notes, and snippets.

@mithildeeva
Created October 22, 2019 11:17
Show Gist options
  • Save mithildeeva/de8948d05eb8c672fa8fb8ff3afe4f99 to your computer and use it in GitHub Desktop.
Save mithildeeva/de8948d05eb8c672fa8fb8ff3afe4f99 to your computer and use it in GitHub Desktop.
Logspout with ELK stack to forward all docker logs
version: '3.3'
services:
elasticsearch:
image: elasticsearch:1.5.2
ports:
- '9200:9200'
- '9300:9300'
kibana:
image: kibana:4.1.2
links:
- elasticsearch
environment:
- ELASTICSEARCH_URL=http://elasticsearch:9200
- LOGSPOUT=ignore
ports:
- '5601:5601'
depends_on:
- elasticsearch
logstash:
image: logstash:2.1.1
environment:
- STDOUT=true
links:
- elasticsearch
- kibana
depends_on:
- elasticsearch
- kibana
command: 'logstash -e "input { udp { port => 5000 } } output { elasticsearch { hosts => elasticsearch } }"'
logspout:
image: gliderlabs/logspout:v3
command: 'udp://logstash:5000'
links:
- logstash
volumes:
- '/var/run/docker.sock:/tmp/docker.sock'
depends_on:
- elasticsearch
- logstash
- kibana
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment