-
Notifications
You must be signed in to change notification settings - Fork 237
/
grafana.yml
196 lines (186 loc) · 5.41 KB
/
grafana.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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
x-logging: &logging
logging:
driver: json-file
options:
max-size: 100m
max-file: "3"
tag: '{{.ImageName}}|{{.Name}}|{{.ImageFullID}}|{{.FullID}}'
services:
prometheus:
restart: "unless-stopped"
build:
context: ./prometheus
image: prometheus:local
user: root
pull_policy: never
volumes:
- prom-data:/prometheus
- /etc/localtime:/etc/localtime:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./prometheus/conf.d/:/etc/prometheus/conf.d/:ro
- ./prometheus/custom-prom.yml:/etc/prometheus/custom-prom.yml:ro
command:
- --storage.tsdb.path=/prometheus
- --storage.tsdb.retention.time=40d
- --web.console.libraries=/usr/share/prometheus/console_libraries
- --web.console.templates=/usr/share/prometheus/consoles
<<: *logging
labels:
- metrics.scrape=true
- metrics.path=/metrics
- metrics.port=9090
- metrics.instance=prometheus
- metrics.network=${NETWORK}
ethereum-metrics-exporter:
restart: "unless-stopped"
image: samcm/ethereum-metrics-exporter:0.24.0-debian
entrypoint:
- /ethereum-metrics-exporter
- --consensus-url=${CL_NODE}
- --execution-url=http://execution:${EL_RPC_PORT:-8545}
<<: *logging
labels:
- metrics.scrape=true
- metrics.path=/metrics
- metrics.port=9090
- metrics.instance=ethereum-metrics-exporter
- metrics.network=${NETWORK}
node-exporter:
image: prom/node-exporter:latest
command:
- '--path.rootfs=/host'
- '--path.procfs=/host/proc'
- '--path.sysfs=/host/sys'
# - '--collector.textfile.directory=/etc/node-exporter/'
- '--collector.filesystem.ignored-mount-points=${NODE_EXPORTER_IGNORE_MOUNT_REGEX}'
- '--no-collector.ipvs'
pid: host
restart: unless-stopped
volumes:
- /:/host:ro,rslave
- /etc/hostname:/etc/nodename:ro
- /proc:/host/proc:ro,rslave
- /sys:/host/sys:ro,rslave
- /etc/localtime:/etc/localtime:ro
<<: *logging
labels:
- metrics.scrape=true
- metrics.path=/metrics
- metrics.port=9100
- metrics.instance=node-exporter
- metrics.network=${NETWORK}
blackbox-exporter:
restart: "unless-stopped"
image: prom/blackbox-exporter:master
volumes:
- ./prometheus/blackbox.yml:/config/blackbox.yml
- /etc/localtime:/etc/localtime:ro
command:
- --config.file=/config/blackbox.yml
<<: *logging
json-exporter:
restart: "unless-stopped"
image: prometheuscommunity/json-exporter:latest
volumes:
- ./prometheus/json.yml:/config/json.yml
- /etc/localtime:/etc/localtime:ro
command:
- --config.file
- /config/json.yml
<<: *logging
labels:
- metrics.scrape=true
- metrics.path=/metrics
- metrics.port=7979
- metrics.instance=json-exporter
- metrics.network=${NETWORK}
cadvisor:
restart: "unless-stopped"
image: gcr.io/cadvisor/cadvisor:v0.49.1
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- /:/rootfs:ro,rslave
- /var/run:/var/run
- /sys:/sys:ro,rslave
- ${DOCKER_ROOT:-/var/lib/docker}:/var/lib/docker:ro,rslave
command:
- --docker_only
- --housekeeping_interval=30s
<<: *logging
labels:
- metrics.scrape=true
- metrics.path=/metrics
- metrics.port=8080
- metrics.instance=cadvisor
- metrics.network=${NETWORK}
promtail:
image: grafana/promtail:latest
user: root
volumes:
- /etc/machine-id:/etc/machine-id:ro
- ./promtail:/etc/promtail
- promtail-data:/tmp
- ${DOCKER_ROOT:-/var/lib/docker}/containers:/var/lib/docker/containers:ro,rslave
entrypoint: ./etc/promtail/entrypoint.sh
command: ["/usr/bin/promtail"]
environment:
SERVER_LABEL_HOSTNAME: ${LOGS_LABEL:-notset}
restart: "unless-stopped"
depends_on:
- loki
<<: *logging
labels:
- metrics.scrape=true
- metrics.path=/metrics
- metrics.port=9080
- metrics.instance=promtail
- metrics.network=${NETWORK}
loki:
image: grafana/loki:latest
volumes:
- loki-data:/tmp
- ./loki:/etc/loki
command:
- '--config.file=/etc/loki/loki.yml'
restart: "unless-stopped"
<<: *logging
labels:
- metrics.scrape=true
- metrics.path=/metrics
- metrics.port=3100
- metrics.instance=loki
- metrics.network=${NETWORK}
grafana:
restart: "unless-stopped"
build:
context: ./grafana
image: grafana:local
pull_policy: never
user: grafana
environment:
- GF_SERVER_HTTP_PORT=${GRAFANA_PORT}
- CLIENT=${COMPOSE_FILE}
volumes:
- grafana-data:/var/lib/grafana
- grafana-config:/etc/grafana
- /etc/localtime:/etc/localtime:ro
entrypoint: ["provision.sh"]
command: /run.sh
<<: *logging
labels:
- traefik.enable=true
- traefik.http.routers.grafana.entrypoints=web,websecure
- traefik.http.routers.grafana.rule=Host(`${GRAFANA_HOST}.${DOMAIN}`)
- traefik.http.routers.grafana.tls.certresolver=letsencrypt
- traefik.http.services.grafana.loadbalancer.server.port=${GRAFANA_PORT}
- metrics.scrape=true
- metrics.path=/metrics
- metrics.port=3000
- metrics.instance=grafana
- metrics.network=${NETWORK}
volumes:
grafana-data:
grafana-config:
prom-data:
loki-data:
promtail-data: