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.
|
2015-08-20 10:04:00 +08:00
|
|
|
# After startup, import the visualization in the kibana-exports.json file.
|
2015-08-10 16:14:51 +08:00
|
|
|
# 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:
|
2015-10-20 15:01:56 +08:00
|
|
|
image: yeasy/elasticsearch:1.7
|
2015-08-10 16:14:51 +08:00
|
|
|
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:
|
2015-10-20 15:01:56 +08:00
|
|
|
image: yeasy/logstash:1.5
|
2015-08-10 16:14:51 +08:00
|
|
|
ports:
|
|
|
|
- "2055/udp:2055/udp"
|
|
|
|
links:
|
|
|
|
- elasticsearch:elasticsearch
|
2015-08-13 10:24:34 +08:00
|
|
|
command: logstash agent -f /etc/logstash/conf.d/
|