-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
98 lines (92 loc) · 2.46 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
# 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
version: '2'
services:
es:
image: elasticsearch:5.5.1
environment:
- cluster.name=home-cluster
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS: -Xmx512m -Xms512m"
- "discovery.zen.ping.unicast.hosts=elasticsearch"
ulimits:
memlock:
soft: -1
hard: -1
mem_limit: 1g
volumes:
- esdata:/usr/share/elasticsearch/data
- esconfig:/usr/share/elasticsearch/config
- eslogs:/usr/share/elasticsearch/logs
networks:
- metrics
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: elastic-netflow:5.5.1
hostname: elasticsearch
environment:
- cluster.name=home-cluster
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS: -Xmx512m -Xms512m"
ulimits:
memlock:
soft: -1
hard: -1
mem_limit: 1g
links:
- es:es
networks:
- metrics
ports:
- "9200:9200"
expose:
- "9300"
volumes:
- elasticsearchdata:/usr/share/elasticsearch/data
command: sh -c "sleep 15; curl -XPUT es:9200/_template/logstash_netflow5 -d@'/tmp/logstash_netflow5.json';elasticsearch"
kibana:
image: kibana:5.5.1
networks:
- metrics
ports:
- "5601:5601"
links:
- elasticsearch:elasticsearch
depends_on:
- elasticsearch
logstash:
image: logstash-netflow:5.5.1
environment:
ES_JAVA_OPTS: "-Xmx256m -Xms256m"
networks:
- metrics
ports:
- "2055/udp:2055/udp"
links:
- elasticsearch:elasticsearch
depends_on:
- elasticsearch
command: logstash -f /etc/logstash/conf.d/
volumes:
esdata:
driver: local
esconfig:
driver: local
eslogs:
driver: local
elasticsearchdata:
driver: local
networks:
metrics:
driver: bridge