-
Notifications
You must be signed in to change notification settings - Fork 4
/
docker-compose.monitoring.yml
79 lines (75 loc) · 2.04 KB
/
docker-compose.monitoring.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
services:
prometheus:
image: prom/prometheus:v2.52.0
container_name: prometheus
command:
- "--config.file=/etc/prometheus/prometheus.yml"
- "--storage.tsdb.path=/prometheus/data"
healthcheck:
test: [ "CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:9090" ]
interval: 5s
timeout: 10s
retries: 5
ports:
- "9090:9090"
volumes:
- ./docker/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
- prometheus-data:/prometheus
cadvisor:
image: gcr.io/cadvisor/cadvisor:v0.49.1
container_name: cadvisor
privileged: true
ports:
- "8880:8080"
devices:
- /dev/kmsg
volumes:
- /:/rootfs:ro
- /sys:/sys:ro
- /var/run:/var/run:rw
- /dev/disk/:/dev/disk:ro
- /var/lib/docker/:/var/lib/docker:ro
- /var/run/docker.sock:/var/run/docker.sock:rw
depends_on:
prometheus:
condition: service_healthy
node-exporter:
image: prom/node-exporter:v1.8.1
container_name: node-exporter
command:
- '--path.procfs=/host/proc'
- '--path.rootfs=/rootfs'
- '--path.sysfs=/host/sys'
- '--collector.filesystem.mount-points-exclude=^/(sys|proc|dev|host|etc)($$|/)'
ports:
- "9100:9100"
volumes:
- /proc:/host/proc:ro
- /sys:/host/sys:ro
- /:/rootfs:ro
depends_on:
prometheus:
condition: service_healthy
grafana:
image: grafana/grafana:9.4.7
container_name: grafana
environment:
- GF_AUTH_BASIC_ENABLED=false
- GF_AUTH_ANONYMOUS_ENABLED=true
- GF_AUTH_ANONYMOUS_ORG_ROLE=Admin
healthcheck:
test: [ "CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3000/api/health" ]
interval: 5s
timeout: 10s
retries: 5
ports:
- "3000:3000"
volumes:
- grafana-data:/var/lib/grafana
- ./docker/grafana/:/etc/grafana/provisioning/
depends_on:
prometheus:
condition: service_healthy
volumes:
prometheus-data:
grafana-data: