-
Notifications
You must be signed in to change notification settings - Fork 9
/
docker-compose.prometheus-example.yaml
74 lines (68 loc) · 1.77 KB
/
docker-compose.prometheus-example.yaml
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
version: "3.9"
networks:
prom:
services:
node-exporter:
image: prom/node-exporter:latest
container_name: node-exporter
restart: unless-stopped
volumes:
- /proc:/host/proc:ro
- /sys:/host/sys:ro
- /:/rootfs:ro
expose:
- 9100
alertmanager:
image: prom/alertmanager:latest
container_name: alertmanager
restart: unless-stopped
volumes:
- ./examples/web/configs/alertmanager.yml:/etc/alertmanager/alertmanager.yml
- ./examples/web/configs/slack_url.txt:/etc/alertmanager/slack_url
command:
- '--config.file=/etc/alertmanager/alertmanager.yml'
expose:
- 9093
ports:
- "9093:9093"
prometheus:
image: prom/prometheus:latest
container_name: prometheus
restart: unless-stopped
volumes:
- ./examples/web/configs/prometheus.yaml:/etc/prometheus/prometheus.yaml
- ./examples/web/configs/autometrics.rules.yml:/etc/prometheus/autometrics.rules.yml
command:
- '--config.file=/etc/prometheus/prometheus.yaml'
- '--enable-feature=exemplar-storage'
expose:
- 9090
ports:
- "9090:9090"
depends_on:
- alertmanager
- node-exporter
- web-server
web-server:
build:
context: .
dockerfile: examples/web/Dockerfile
environment:
AUTOMETRICS_SERVICE_NAME: autometrics_prometheus
AUTOMETRICS_PUSH_GATEWAY_URL: $AUTOMETRICS_PUSH_GATEWAY_URL
container_name: web-server-prom
restart: unless-stopped
expose:
- 62086
ports:
- "62086:62086"
load-server:
build:
context: .
dockerfile: examples/web/load.Dockerfile
environment:
TARGET_HOST: web-server-prom
container_name: load-server-prom
restart: unless-stopped
depends_on:
- web-server