-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose-extra-monitoring.yml
68 lines (61 loc) · 1.79 KB
/
docker-compose-extra-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
version: "3.8"
services:
nodeexporter:
image: prom/node-exporter:latest
container_name: nodeexporter
restart: unless-stopped
expose:
- 9100
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)($$|/)'
networks:
- backend
labels:
org.label-schema.group: "monitoring"
cadvisor:
image: gcr.io/google-containers/cadvisor:latest
container_name: cadvisor
restart: unless-stopped
ports:
- 8082:8080
volumes:
- /:/rootfs:ro
- /var/run:/var/run:rw
- /sys:/sys:ro
- /var/lib/docker/:/var/lib/docker:ro
labels:
- "traefik.enable=true"
# Define my service
- "traefik.http.services.cadvisor.loadbalancer.server.port=8080"
# Route cadvisor.local to me
- "traefik.http.routers.cadvisor.rule=Host(`cadvisor.local`)"
- "traefik.http.routers.cadvisor.entrypoints=web,websecure"
- "traefik.http.routers.cadvisor.tls=true"
- "traefik.http.routers.cadvisor.service=cadvisor"
# Route /cadvisor/metrics and replacepath
- "traefik.http.routers.cadvisor-metrics-path.rule=Path(`/cadvisor/metrics`)"
- "traefik.http.routers.cadvisor-metrics-path.entrypoints=web"
- "traefik.http.routers.cadvisor-metrics-path.service=cadvisor"
- "traefik.http.routers.cadvisor-metrics-path.middlewares=replacerewithmetricspath"
depends_on:
- redis
networks:
backend:
redis:
image: redis:latest
container_name: redis
restart: unless-stopped
ports:
- 6379:6379
networks:
backend:
networks:
backend:
name: backend