-
Notifications
You must be signed in to change notification settings - Fork 12
/
prometheus.yml
67 lines (63 loc) · 1.84 KB
/
prometheus.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
x-logging: &logging
logging:
driver: json-file
options:
max-size: 10m
max-file: "3"
tag: '{{.ImageName}}|{{.Name}}|{{.ImageFullID}}|{{.FullID}}'
services:
prometheus:
restart: unless-stopped
build:
context: ./prometheus
image: prometheus:vd-local
user: root
volumes:
- prom-data:/prometheus
- /etc/localtime:/etc/localtime:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./prometheus/custom-prom.yml:/etc/prometheus/custom-prom.yml:ro
entrypoint: choose-config.sh
command: ["/bin/prometheus", "--storage.tsdb.path=/prometheus", "--web.console.libraries=/usr/share/prometheus/console_libraries", "--web.console.templates=/usr/share/prometheus/consoles", "--log.level=${LOG_LEVEL:-info}"]
<<: *logging
depends_on:
- node-exporter
- cadvisor
node-exporter:
image: quay.io/prometheus/node-exporter:latest
command:
- '--path.rootfs=/host'
- '--path.procfs=/host/proc'
- '--path.sysfs=/host/sys'
- '--collector.filesystem.ignored-mount-points=^/(dev|proc|sys|run|var/lib/docker/.+)($$|/)'
- '--no-collector.ipvs'
pid: host
restart: unless-stopped
volumes:
- '/:/host:ro,rslave'
- /etc/hostname:/etc/nodename:ro
- /proc:/host/proc:ro
- /sys:/host/sys:ro
- /etc/localtime:/etc/localtime:ro
labels:
- metrics.scrape=true
- metrics.path=/metrics
- metrics.port=9100
<<: *logging
cadvisor:
image: gcr.io/cadvisor/cadvisor
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:
- metrics.scrape=true
- metrics.path=/metrics
- metrics.port=8080
<<: *logging
volumes:
prom-data: