-
Notifications
You must be signed in to change notification settings - Fork 272
Expand file tree
/
Copy pathgrafana-rootless.yml
More file actions
169 lines (160 loc) · 4.67 KB
/
grafana-rootless.yml
File metadata and controls
169 lines (160 loc) · 4.67 KB
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
# Grafana for use with rootless docker
# Omits node-exporter and cadvisor. If you want them, run them on the host, then scrape
# them with custom config in ./alloy/config.d
x-logging: &logging
logging:
driver: json-file
options:
max-size: 100m
max-file: "3"
tag: '{{.ImageName}}|{{.Name}}|{{.ImageFullID}}|{{.FullID}}'
services:
prometheus:
restart: "unless-stopped"
image: prom/prometheus:latest
volumes:
- prom-data:/prometheus
- ./prometheus/prometheus.yml:/prometheus/prometheus.yml
- /etc/localtime:/etc/localtime:ro
command:
- --storage.tsdb.path=/prometheus
- --storage.tsdb.retention.time=${PROMETHEUS_RETENTION_TIME:-40d}
- --web.enable-remote-write-receiver
<<: *logging
labels:
- metrics.scrape=true
- metrics.path=/metrics
- metrics.port=9090
- metrics.instance=prometheus
- metrics.network=${NETWORK}
- logs.collect=true
ethereum-metrics-exporter:
restart: "unless-stopped"
image: samcm/ethereum-metrics-exporter:debian-latest
entrypoint:
- /ethereum-metrics-exporter
- --consensus-url=http://consensus:${CL_REST_PORT:-5052}
- --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}
- logs.collect=true
blackbox-exporter:
restart: "unless-stopped"
image: prom/blackbox-exporter:latest
volumes:
- ./prometheus/blackbox.yml:/config/blackbox.yml
- /etc/localtime:/etc/localtime:ro
<<: *logging
command:
- --config.file=/config/blackbox.yml
json-exporter:
restart: "unless-stopped"
image: prometheuscommunity/json-exporter:latest
volumes:
- ./prometheus/json.yml:/config/json.yml
- /etc/localtime:/etc/localtime:ro
<<: *logging
command:
- --config.file
- /config/json.yml
labels:
- metrics.scrape=true
- metrics.path=/metrics
- metrics.port=7979
- metrics.instance=json-exporter
- metrics.network=${NETWORK}
- logs.collect=true
tempo:
image: grafana/tempo:2.10.4
command:
- '-config.file=/etc/tempo.yaml'
volumes:
- ./tempo/tempo.yaml:/etc/tempo.yaml
- ./tempo/overrides.yaml:/etc/overrides.yaml
- tempo-data:/var/tempo
restart: "unless-stopped"
<<: *logging
labels:
- metrics.scrape=true
- metrics.path=/metrics
- metrics.port=3200
- metrics.instance=tempo
- metrics.network=${NETWORK}
- logs.collect=true
alloy:
image: grafana/alloy:latest
restart: unless-stopped
volumes:
- alloy-data:/var/lib/alloy
- ./alloy:/etc/alloy
- /etc/localtime:/etc/localtime:ro
- ${DOCKER_SOCK:-${XDG_RUNTIME_DIR%/}/docker.sock}:/var/run/docker.sock:ro
- ${DOCKER_ROOT:-${HOME}/.local/share/docker}/containers:/var/lib/docker/containers:ro
extra_hosts: # So we can scrape targets on the host
- "host.docker.internal:host-gateway"
entrypoint:
- alloy
- run
- --server.http.listen-addr=0.0.0.0:12345
- --storage.path=/var/lib/alloy/data
- /etc/alloy
labels:
- metrics.scrape=true
- metrics.path=/metrics
- metrics.port=12345
- metrics.instance=alloy
- metrics.network=${NETWORK}
- logs.collect=true
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}
- logs.collect=true
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
depends_on:
- prometheus
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}
volumes:
grafana-data:
grafana-config:
prom-data:
tempo-data:
loki-data:
alloy-data: