-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathdocker-compose-influxdb-zipkin.yml
384 lines (361 loc) · 10.9 KB
/
docker-compose-influxdb-zipkin.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
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
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
x-java-entrypoint: &java_entrypoint
- "java"
- "-javaagent:/agent/inspectit-ocelot-agent.jar"
- "-Dinspectit.config.http.url=http://ocelot-config-server:8090/api/v1/agent/configuration"
- "org.springframework.boot.loader.launch.JarLauncher"
services:
#################
### inspectIT ###
#################
# Ocelot agent
## Serves as a collector for traces and metrics
agent:
image: inspectit/inspectit-ocelot-agent:${INSPECTIT_OCELOT_VERSION}
container_name: agent
restart: always
deploy:
resources:
limits:
memory: 128M
depends_on:
influxdb:
condition: service_healthy
volumes:
- agent-vol:/agent
## Provides the configuration
ocelot-config-server:
image: inspectit/inspectit-ocelot-configurationserver:${INSPECTIT_OCELOT_VERSION}
container_name: ocelot-config-server
restart: always
deploy:
resources:
limits:
memory: 512M
environment:
- INSPECTIT_CONFIG_SERVER_WORKING_DIRECTORY=/configuration-server
- INSPECTIT_CONFIG_SERVER_DEFAULT_USER_PASSWORD=demo
volumes:
- ./configuration-server:/configuration-server
ports:
- "8090:8090"
## End user monitoring
ocelot-eum-server:
image: inspectit/inspectit-ocelot-eum-server:${INSPECTIT_OCELOT_EUM_VERSION}
container_name: ocelot-eum-server
restart: always
environment:
- INSPECTIT_EUM_SERVER_EXPORTERS_METRICS_INFLUX_ENDPOINT=http://influxdb:8086
- INSPECTIT_EUM_SERVER_EXPORTERS_METRICS_INFLUX_DATABASE=inspectit_eum
- INSPECTIT_EUM_SERVER_EXPORTERS_TRACING_OTLP_ENDPOINT=http://otel-collector:4317
- INSPECTIT_EUM_SERVER_EXPORTERS_TRACING_OTLP_PROTOCOL=grpc
- INSPECTIT_SERVICE_NAME=eum-server
- INSPECTIT_EXPORTERS_METRICS_INFLUX_ENDPOINT=http://influxdb:8086
- INSPECTIT_EXPORTERS_TRACING_ZIPKIN_ENDPOINT=http://zipkin:9411/api/v2/spans
depends_on:
- agent
- config-server
entrypoint: [
"java",
"-Dserver.port=8085",
"-Dinspectit.config.http.url=http://ocelot-config-server:8090/api/v1/agent/configuration",
"-javaagent:/agent/inspectit-ocelot-agent.jar",
"-jar",
"/inspectit-ocelot-eum-server.jar"
]
deploy:
resources:
limits:
memory: 256M
volumes:
- agent-vol:/agent
ports:
- "8085:8085"
#########################
#### DEMO APPLICATION ###
#########################
config-server:
image: inspectit/spring-petclinic-config-server:${INSPECTIT_PETCLINIC_VERSION}
container_name: config-server
restart: always
environment:
- INSPECTIT_SERVICE_NAME=config-server
- INSPECTIT_EXPORTERS_METRICS_INFLUX_ENDPOINT=http://influxdb:8086
- INSPECTIT_EXPORTERS_TRACING_ZIPKIN_ENDPOINT=http://zipkin:9411/api/v2/spans
deploy:
resources:
limits:
memory: 512M
depends_on:
agent:
condition: service_started
ocelot-config-server:
condition: service_started
entrypoint: *java_entrypoint
healthcheck:
test: ["CMD", "curl", "-I", "http://config-server:8888"]
interval: 20s
timeout: 5s
retries: 10
volumes:
- agent-vol:/agent
ports:
- "8888:8888"
discovery-server:
image: inspectit/spring-petclinic-discovery-server:${INSPECTIT_PETCLINIC_VERSION}
container_name: discovery-server
restart: always
environment:
- INSPECTIT_SERVICE_NAME=discovery-server
- INSPECTIT_EXPORTERS_METRICS_INFLUX_ENDPOINT=http://influxdb:8086
- INSPECTIT_EXPORTERS_TRACING_ZIPKIN_ENDPOINT=http://zipkin:9411/api/v2/spans
deploy:
resources:
limits:
memory: 512M
depends_on:
agent:
condition: service_started
ocelot-config-server:
condition: service_started
config-server:
condition: service_healthy
entrypoint: *java_entrypoint
healthcheck:
test: ["CMD", "curl", "-f", "http://discovery-server:8761"]
interval: 20s
timeout: 3s
retries: 10
volumes:
- agent-vol:/agent
ports:
- "8761:8761"
customers-service:
image: inspectit/spring-petclinic-customers-service:${INSPECTIT_PETCLINIC_VERSION}
container_name: customers-service
restart: always
environment:
- INSPECTIT_SERVICE_NAME=customers-service
- INSPECTIT_EXPORTERS_METRICS_INFLUX_ENDPOINT=http://influxdb:8086
- INSPECTIT_EXPORTERS_TRACING_ZIPKIN_ENDPOINT=http://zipkin:9411/api/v2/spans
- MANAGEMENT_TRACING_ENABLED=false # disable spring zipkin tracing
deploy:
resources:
limits:
memory: 512M
depends_on:
agent:
condition: service_started
ocelot-config-server:
condition: service_started
config-server:
condition: service_healthy
discovery-server:
condition: service_healthy
entrypoint: *java_entrypoint
volumes:
- agent-vol:/agent
ports:
- "8081:8081"
visits-service:
image: inspectit/spring-petclinic-visits-service:${INSPECTIT_PETCLINIC_VERSION}
container_name: visits-service
restart: always
environment:
- INSPECTIT_SERVICE_NAME=visits-service
- INSPECTIT_EXPORTERS_METRICS_INFLUX_ENDPOINT=http://influxdb:8086
- INSPECTIT_EXPORTERS_TRACING_ZIPKIN_ENDPOINT=http://zipkin:9411/api/v2/spans
- MANAGEMENT_TRACING_ENABLED=false # disable spring zipkin tracing
deploy:
resources:
limits:
memory: 512M
depends_on:
agent:
condition: service_started
ocelot-config-server:
condition: service_started
config-server:
condition: service_healthy
discovery-server:
condition: service_healthy
entrypoint: *java_entrypoint
volumes:
- agent-vol:/agent
ports:
- "8082:8082"
vets-service:
image: inspectit/spring-petclinic-vets-service:${INSPECTIT_PETCLINIC_VERSION}
container_name: vets-service
restart: always
environment:
- INSPECTIT_SERVICE_NAME=vets-service
- INSPECTIT_EXPORTERS_METRICS_INFLUX_ENDPOINT=http://influxdb:8086
- INSPECTIT_EXPORTERS_TRACING_ZIPKIN_ENDPOINT=http://zipkin:9411/api/v2/spans
- MANAGEMENT_TRACING_ENABLED=false # disable spring zipkin tracing
deploy:
resources:
limits:
memory: 512M
depends_on:
agent:
condition: service_started
ocelot-config-server:
condition: service_started
config-server:
condition: service_healthy
discovery-server:
condition: service_healthy
entrypoint: *java_entrypoint
volumes:
- agent-vol:/agent
ports:
- "8083:8083"
api-gateway:
image: inspectit/spring-petclinic-api-gateway:${INSPECTIT_PETCLINIC_VERSION}
container_name: api-gateway
hostname: api-gateway
environment:
- INSPECTIT_SERVICE_NAME=api-gateway
- INSPECTIT_EXPORTERS_METRICS_INFLUX_ENDPOINT=http://influxdb:8086
- INSPECTIT_EXPORTERS_TRACING_ZIPKIN_ENDPOINT=http://zipkin:9411/api/v2/spans
- MANAGEMENT_TRACING_ENABLED=false # disable spring zipkin tracing
deploy:
resources:
limits:
memory: 1024M
depends_on:
agent:
condition: service_started
ocelot-config-server:
condition: service_started
config-server:
condition: service_healthy
discovery-server:
condition: service_healthy
entrypoint: *java_entrypoint
volumes:
- agent-vol:/agent
ports:
- 8080:8080
genai-service:
image: inspectit/spring-petclinic-genai-service:${INSPECTIT_PETCLINIC_VERSION}
container_name: genai-service
restart: always
environment:
- INSPECTIT_SERVICE_NAME=genai-service
- INSPECTIT_EXPORTERS_METRICS_INFLUX_ENDPOINT=http://influxdb:8086
- INSPECTIT_EXPORTERS_TRACING_ZIPKIN_ENDPOINT=http://zipkin:9411/api/v2/spans
- MANAGEMENT_TRACING_ENABLED=false # disable spring zipkin tracing
deploy:
resources:
limits:
memory: 512M
depends_on:
agent:
condition: service_started
ocelot-config-server:
condition: service_started
config-server:
condition: service_healthy
discovery-server:
condition: service_healthy
entrypoint: *java_entrypoint
volumes:
- agent-vol:/agent
ports:
- "8084:8084"
###########################
### MONITORING BACKEND ###
###########################
# Load Generator
## Artificial load on demo
load:
build:
context: load
container_name: load-generator
restart: always
environment:
- LOCUST_WEB_PORT
- LOCUST_USERS
- LOCUST_HOST
- LOCUST_HEADLESS
- LOCUST_AUTOSTART
ports:
- "8089:8089"
# InfluxDB
## Time Series Database
influxdb:
image: influxdb:1.8
container_name: influxdb
restart: always
environment:
- INFLUXDB_HTTP_FLUX_ENABLED=true
- INFLUXDB_HTTP_LOG_ENABLED=false
- INFLUXDB_DATA_QUERY_LOG_ENABLED=false
deploy:
resources:
limits:
memory: 512M
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:8086/ping" ]
interval: 20s
timeout: 3s
retries: 10
volumes:
- ./influx:/docker-entrypoint-initdb.d
ports:
- "8086:8086"
# OpenTelemetry collector
## Collects traces
otel-collector:
image: otel/opentelemetry-collector-contrib:0.120.0
container_name: otel-collector
restart: always
command: [ "--config=/etc/otelcol-config.yml" ]
volumes:
- ./otel/otelcol-zipkin-config.yml:/etc/otelcol-config.yml
ports:
- "4317:4317" # OTLP GRPC receiver
- "4318:4318" # OTLP HTTP receiver
# Zipkin
## Collects and visualizes traces
zipkin:
image: openzipkin/zipkin:3.5
container_name: zipkin
restart: always
ports:
- "9411:9411"
# Grafana
## Dashboarding
grafana:
image: grafana/grafana:11.2.0
container_name: grafana
restart: always
environment:
- GF_PANELS_DISABLE_SANITIZE_HTML=TRUE
- GF_SECURITY_ADMIN_PASSWORD=demo
- GF_PATHS_PROVISIONING=/usr/share/grafana/custom/
- GF_INSTALL_PLUGINS=https://github.com/NovatecConsulting/novatec-service-dependency-graph-panel/releases/download/v4.2.0/novatec-sdg-panel.zip;novatec-sdg-panel
volumes:
- ./grafana/provisioning/influxdb:/usr/share/grafana/custom/
- ./grafana/provisioning/home-dashboard/home.json:/usr/share/grafana/public/dashboards/home.json
ports:
- "3000:3000"
# Grafana Loki & Promtail
## Make logs available in Grafana
loki:
image: grafana/loki:3.4.1
container_name: loki
restart: always
ports:
- "3100:3100"
command: -config.file=/etc/loki/local-config.yaml
promtail:
image: grafana/promtail:3.4.1
container_name: promtail
restart: always
volumes:
- /var/log:/var/log
command: -config.file=/etc/promtail/config.yml
volumes:
agent-vol: