Created
June 6, 2017 21:17
-
-
Save vovimayhem/3bf5e9ea72a5768a3744cd401462a521 to your computer and use it in GitHub Desktop.
ELK stack example
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: "2" | |
volumes: | |
log-data: | |
driver: local | |
services: | |
elasticsearch: | |
image: elasticsearch:5.0 | |
ports: | |
- "9200:9200" | |
- "9300:9300" | |
volumes: | |
# We'll store the elasticsearch data in the 'log-data' volume we defined: | |
- log-data:/usr/share/elasticsearch/data | |
environment: | |
ES_JAVA_OPTS: "-Xms1g -Xmx1g" | |
labels: | |
- "constraint:node.labels.data-host==true" | |
networks: | |
- elk | |
kibana: | |
image: kibana:5.0 | |
ports: | |
- "5601:5601" | |
links: | |
- elasticsearch:foresight-log-elasticsearch | |
networks: | |
- elk | |
logstash: | |
image: logstash:5.0 | |
command: -e 'input { gelf { type => docker port => 12201 } } output { elasticsearch { hosts => ["foresight-log-elasticsearch:9200"] } }' | |
ports: | |
- "12201:12201/udp" | |
links: | |
- elasticsearch:foresight-log-elasticsearch | |
networks: | |
- elk | |
networks: | |
elk: | |
driver: bridge |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment