-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
191 lines (180 loc) · 5.2 KB
/
Copy pathdocker-compose.yml
File metadata and controls
191 lines (180 loc) · 5.2 KB
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
version: '3.4'
services:
monitoringdemo:
image: ${DOCKER_REGISTRY-}monitoringdemo
build:
context: .
dockerfile: MonitoringDemo/Dockerfile
ports:
- "49166:80"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 15s
environment:
- Serilog__WriteTo__0__Args__requestUri=http://logstash:28080
- Services__LogstashUri=http://logstash:9600 # Status Web API (HTTP)
- Services__ElasticsearchUri=http://elasticsearch:9200
- Services__KibanaUri=http://kibana:5601
- Services__PrometheusUri=http://prometheus:9090
- Services__GrafanaUri=http://grafana:3000
- Services__CAdvisorUri=http://cadvisor:8080
- Services__NodeExporterUri=http://nodeexporter:9100
- Services__AlertManagerUri=http://alertmanager:9093
depends_on:
- elasticsearch
- logstash
- kibana
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:$ELK_VERSION
ports:
- "9200:9200"
- "9300:9300"
volumes:
- type: bind
source: ./elasticsearch/config/elasticsearch.yml
target: /usr/share/elasticsearch/config/elasticsearch.yml
read_only: true
- type: volume
source: elasticsearch
target: /usr/share/elasticsearch/data
environment:
ES_JAVA_OPTS: "-Xmx1024m -Xms1024m"
# ELASTIC_PASSWORD: changeme
# Use single node discovery in order to disable production mode and avoid bootstrap checks.
# see: https://www.elastic.co/guide/en/elasticsearch/reference/current/bootstrap-checks.html
discovery.type: single-node
labels:
org.label-schema.group: "logging"
logstash:
image: docker.elastic.co/logstash/logstash:$ELK_VERSION
ports:
- "5044:5044"
- "5000:5000"
- "9600:9600" # Status Web API (HTTP)
- "28080:28080" # HTTP input
volumes:
- type: bind
source: ./logstash/config/logstash.yml
target: /usr/share/logstash/config/logstash.yml
read_only: true
- type: bind
source: ./logstash/pipeline
target: /usr/share/logstash/pipeline
read_only: true
environment:
LS_JAVA_OPTS: "-Xmx1024m -Xms1024m"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9600"]
interval: 1m30s
timeout: 30s
retries: 3
start_period: 15s
depends_on:
- elasticsearch
labels:
org.label-schema.group: "logging"
kibana:
image: docker.elastic.co/kibana/kibana:$ELK_VERSION
ports:
- "5601:5601"
volumes:
- type: bind
source: ./kibana/config/kibana.yml
target: /usr/share/kibana/config/kibana.yml
read_only: true
depends_on:
- elasticsearch
labels:
org.label-schema.group: "logging"
prometheus:
image: prom/prometheus:$PROMETHEUS_VERSION
ports:
- 9090:9090
volumes:
- type: bind
source: ./prometheus/config/prometheus.yml
target: /etc/prometheus/prometheus.yml
read_only: true
- type: volume
source: prometheus
target: /prometheus
labels:
org.label-schema.group: "monitoring"
pushgateway:
image: prom/pushgateway:$PUSHGATEWAY_VERSION
ports:
- 9091:9091
labels:
org.label-schema.group: "monitoring"
grafana:
image: grafana/grafana:$GRAFANA_VERSION
ports:
- 3000:3000
volumes:
- type: bind
source: ./grafana/config/grafana.ini
target: /etc/grafana/grafana.ini
- type: bind
source: ./grafana/provisioning/dashboards
target: /etc/grafana/provisioning/dashboards
- type: bind
source: ./grafana/provisioning/datasources
target: /etc/grafana/provisioning/datasources
- type: volume
source: grafana
target: /var/lib/grafana
depends_on:
- prometheus
labels:
org.label-schema.group: "monitoring"
cadvisor:
image: gcr.io/cadvisor/cadvisor:$CADVISOR_VERSION
ports:
- 8080:8080
volumes:
- /:/rootfs:ro
- /var/run:/var/run:rw
- /sys:/sys:ro
- /var/lib/docker:/var/lib/docker:ro
labels:
org.label-schema.group: "monitoring"
nodeexporter:
image: prom/node-exporter:$NODEEXPORTER_VERSION
volumes:
- /proc:/host/proc:ro
- /sys:/host/sys:ro
- /:/rootfs:ro
command:
- '--path.procfs=/host/proc'
- '--path.rootfs=/rootfs'
- '--path.sysfs=/host/sys'
- '--collector.filesystem.ignored-mount-points=^/(sys|proc|dev|host|etc)($$|/)'
ports:
- 9100:9100
labels:
org.label-schema.group: "monitoring"
alertmanager:
image: prom/alertmanager:$ALERTMANAGER_VERSION
ports:
- 9093:9093
volumes:
- type: bind
source: ./alertmanager/config/config.yml
target: /etc/alertmanager/config.yml
read_only: true
- type: volume
source: alertmanager
target: /data
command:
- '--config.file=/etc/alertmanager/config.yml'
- '--storage.path=/data'
labels:
org.label-schema.group: "monitoring"
volumes:
elasticsearch:
prometheus:
grafana:
alertmanager: