-
Notifications
You must be signed in to change notification settings - Fork 272
Expand file tree
/
Copy pathgrafana-cloud.yml
More file actions
146 lines (137 loc) · 4.48 KB
/
grafana-cloud.yml
File metadata and controls
146 lines (137 loc) · 4.48 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
# Use ./alloy/write-loki.yml and ./alloy/write-prometheus.yml to control
# where logs and metrics are being sent
# ./alloy/config.d can have additional configuration files such as custom scrape targets
#
# This file is called grafana-cloud.yml, as adding a remote write to Grafana Cloud is a
# common use case. It properly is a Grafana Alloy without local Grafana, or a local metrics/log store
x-logging: &logging
logging:
driver: json-file
options:
max-size: 100m
max-file: "3"
tag: '{{.ImageName}}|{{.Name}}|{{.ImageFullID}}|{{.FullID}}'
services:
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
- logs.collect=true
node-exporter:
image: prom/node-exporter:latest
command:
- '--path.rootfs=/host'
- '--path.procfs=/host/proc'
- '--path.sysfs=/host/sys'
- '--collector.filesystem.mount-points-exclude=${NODE_EXPORTER_IGNORE_MOUNT_REGEX}'
- '--no-collector.ipvs'
- '--collector.textfile.directory=${NODE_EXPORTER_COLLECTOR_MOUNT_PATH:-/dev/null}'
- '--collector.netdev.device-exclude=^(veth.*|docker.*|br-.*)$'
- '--web.listen-address=0.0.0.0:${NODE_EXPORTER_PORT:-9199}'
pid: host
network_mode: host # See all network interfaces
restart: unless-stopped
environment:
- NODE_EXPORTER_COLLECTOR_MOUNT_PATH=${NODE_EXPORTER_COLLECTOR_MOUNT_PATH:-/dev/null}
volumes:
- /:/host:ro,rslave
- /etc/hostname:/etc/nodename:ro
- /proc:/host/proc:ro,rslave
- /sys:/host/sys:ro,rslave
- /etc/localtime:/etc/localtime:ro
- ${NODE_EXPORTER_COLLECTOR_MOUNT_PATH:-/dev/null}:${NODE_EXPORTER_COLLECTOR_MOUNT_PATH:-/dev/null}:ro
<<: *logging
labels:
- metrics.scrape=true
- metrics.path=/metrics
- metrics.host=host.docker.internal
- metrics.port=${NODE_EXPORTER_PORT:-9199}
- metrics.instance=node-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
command:
- --config.file=/config/blackbox.yml
<<: *logging
labels:
- logs.collect=true
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}
- logs.collect=true
cadvisor:
restart: "unless-stopped"
image: ghcr.io/google/cadvisor:latest
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
devices:
- /dev/kmsg:/dev/kmsg
privileged: true
command:
- --docker_only
- --housekeeping_interval=30s
<<: *logging
labels:
- metrics.scrape=true
- metrics.path=/metrics
- metrics.port=8080
- metrics.instance=cadvisor
- 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:-/var/run/docker.sock}:/var/run/docker.sock:ro
- ${DOCKER_ROOT:-/var/lib/docker}/containers:/var/lib/docker/containers:ro,rslave
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
volumes:
alloy-data: