-
Notifications
You must be signed in to change notification settings - Fork 5
/
docker-compose.yml
55 lines (51 loc) · 1.54 KB
/
docker-compose.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
version: '3'
services:
node-exporter:
restart: unless-stopped
image: prom/node-exporter:latest
container_name: node-exporter
hostname: raspberry-pi
ports:
- 9100:9100
volumes:
- /proc:/host/proc:ro
- /sys:/host/sys:ro
- /media:/media:ro
- node-exporter-textfile:/textfile
command: --collector.textfile.directory=/textfile
prometheus:
restart: unless-stopped
image: prom/prometheus:latest
container_name: prometheus
ports:
- 9090:9090
links:
- node-exporter:node-exporter
volumes:
- ./prometheus-config.yml:/etc/prometheus/prometheus.yml
- prometheus:/prometheus
rpi-thermal-exporter:
restart: unless-stopped
image: busybox:latest
container_name: rpi-thermal-exporter
volumes:
- node-exporter-textfile:/textfile
- /sys:/host/sys:ro
command: /bin/sh -c 'while [ 1 ]; do /bin/echo cpu_temperature `cat /host/sys/class/thermal/thermal_zone0/temp` > /textfile/thermal_zone0.prom; sleep 5; test $$? -gt 128 && break; done'
grafana:
restart: unless-stopped
image: grafana/grafana:master
container_name: grafana
ports:
- 3000:3000
links:
- prometheus:prometheus
volumes:
- grafana:/var/lib/grafana
- ./prometheus-datasource.yml:/etc/grafana/provisioning/datasources/prometheus.yml
- ./rpi-dashboard-provisioning.yml:/etc/grafana/provisioning/dashboards/rpi-dashboard-provisioning.yml
- ./rpi-dashboard.json:/etc/grafana/data/dashboards/rpi-dashboard.json
volumes:
node-exporter-textfile:
grafana:
prometheus: