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

47 lines
1.2 KiB
YAML

# This compose file will boot a elk cluster.
# elasticsearch will listen on local 9200, and use /opt/data/elasticsearch for storage.
# es node can scale out.
# logstash will liten on local udp 2055.
# kibana will liten on local 5601.
# After startup, import the visualization in the kibana-exports.json file.
# 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
command: logstash agent -f /etc/logstash/conf.d/