docker-compose-files/elk_netflow/docker-compose.yml

46 lines
1.1 KiB
YAML
Raw Normal View History

2015-08-10 16:14:51 +08:00
# This compose file will boot a elk cluster.
2015-08-10 16:16:33 +08:00
# elasticsearch will listen on local 9200, and use /opt/data/elasticsearch for storage.
# es node can scale out.
2015-08-10 16:14:51 +08:00
# logstash will liten on local udp 2055.
# kibana will liten on local 5601.
# https://github.com/yeasy/docker-compose-files
# scale this with docker-compose scale es=3
es:
image: elasticsearch:1.7
expose:
- "9200"
- "9300"
#elasticsearch configuration node, should not be scaled
#config is under /usr/share/elasticsearch/config
#data is under /usr/share/elasticsearch/data
elasticsearch:
image: yeasy/elasticsearch:latest
hostname: elasticsearch
links:
- es:es
ports:
- "9200:9200"
expose:
- "9300"
volumes:
- /opt/data/elasticsearch:/usr/share/elasticsearch/data
command: sh -c "sleep 10; curl -XPUT es:9200/_template/logstash_netflow -d@'/tmp/logstash_netflow.json';elasticsearch"
kibana:
image: kibana:4.1
ports:
- "5601:5601"
links:
- elasticsearch:elasticsearch
logstash:
image: yeasy/logstash
ports:
- "2055/udp:2055/udp"
links:
- elasticsearch:elasticsearch
2015-08-13 10:24:34 +08:00
command: logstash agent -f /etc/logstash/conf.d/