-
Notifications
You must be signed in to change notification settings - Fork 0
/
prometheus-metrics.yml
60 lines (57 loc) · 1.58 KB
/
prometheus-metrics.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
volumes:
prometheus_data: {}
services:
node-exporter:
image: prom/node-exporter:latest
user: root
volumes:
- /etc/machine-id:/etc/machine-id:ro
- /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)($$|/)'
restart: unless-stopped
labels:
- promtail.logs=true
- metrics.scrape=true
- metrics.path=/metrics
- metrics.port=9100
- metrics.instance=node-exporter
cadvisor:
restart: unless-stopped
image: gcr.io/cadvisor/cadvisor:v0.47.2
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- /:/rootfs:ro
- /var/run:/var/run
- /sys:/sys:ro
- /var/lib/docker:/var/lib/docker:ro
command:
- --docker_only
labels:
- promtail.logs=true
- metrics.scrape=true
- metrics.path=/metrics
- metrics.port=8080
- metrics.instance=cadvisor
prometheus:
image: prom/prometheus:latest
user: root
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- prometheus_data:/prometheus
- ./prometheus:/etc/prometheus
- ./prometheus/global.yml:/etc/prometheus/prometheus.yml
entrypoint: sh /etc/prometheus/entrypoint.sh
command: ["/bin/prometheus"]
restart: unless-stopped
labels:
- promtail.logs=true
- metrics.scrape=true
- metrics.path=/metrics
- metrics.port=9090
- metrics.instance=prometheus