Created
October 22, 2019 11:17
-
-
Save mithildeeva/de8948d05eb8c672fa8fb8ff3afe4f99 to your computer and use it in GitHub Desktop.
Logspout with ELK stack to forward all docker logs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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