-
Notifications
You must be signed in to change notification settings - Fork 32
/
docker-compose-step4.yml
55 lines (55 loc) · 1.72 KB
/
docker-compose-step4.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
version: "3"
services:
example:
image: ubuntu
command: bash -c 'echo $${RANDOM} ; sleep 1'
restart: always
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:5.6.0
restart: on-failure
ports:
- "9200:9200"
- "9300:9300"
environment:
xpack.security.enabled: "false"
kibana:
image: docker.elastic.co/kibana/kibana:5.5.2
restart: on-failure
ports:
- "5601:5601"
environment:
xpack.security.enabled: "false"
depends_on:
- elasticsearch
kibana_index_pattern:
image: tutum/curl
command: |
bash -c "sleep 30 ; curl 'http://kibana:5601/es_admin/.kibana/index-pattern/logstash-*/_create' -H 'kbn-version: 5.5.2' -H 'content-type: application/json' --data-binary '{\"title\":\"logstash-*\",\"timeFieldName\":\"@timestamp\",\"notExpandable\":true}'"
depends_on:
- kibana
logstash:
image: logstash:5
restart: on-failure
command: -e "input { udp { port => 5000 codec => json } } filter { if [docker][image] =~ /^logstash/ { drop { } } } output { elasticsearch { hosts => "elasticsearch" } }"
depends_on:
- elasticsearch
logspout:
image: bekt/logspout-logstash
restart: on-failure
volumes:
- /var/run/docker.sock:/tmp/docker.sock
environment:
ROUTE_URIS: logstash://logstash:5000
depends_on:
- logstash
metricbeat:
image: docker.elastic.co/beats/metricbeat:5.6.3
volumes:
- /var/run/docker.sock:/tmp/docker.sock
depends_on:
- elasticsearch
metricbeat-dashboard-setup:
image: docker.elastic.co/beats/metricbeat:5.6.3
command: bash -c 'sleep 30; ./scripts/import_dashboards -es http://elasticsearch:9200'
depends_on:
- elasticsearch