forked from oijkn/Docker-Raspberry-PI-Monitoring
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
80 lines (76 loc) · 2.07 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
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
version: "3"
services:
cadvisor:
container_name: monitoring-cadvisor
devices:
- /dev/kmsg
expose:
- 8080
hostname: rpi-cadvisor
image: zcube/cadvisor:latest
ipc: shareable
networks:
- rpimonitor_default
privileged: true
restart: unless-stopped
security_opt:
- label=disable
volumes:
- /:/rootfs:ro
- /var/run:/var/run:ro
- /sys:/sys:ro
- /var/lib/docker/:/var/lib/docker:ro
- /dev/disk/:/dev/disk:ro
grafana:
container_name: monitoring-grafana
environment:
- GF_USERS_ALLOW_SIGN_UP=false
- GF_PATHS_CONFIG=/etc/grafana/grafana.ini
- GF_PATHS_DATA=/var/lib/grafana
- GF_PATHS_HOME=/usr/share/grafana
- GF_PATHS_LOGS=/var/log/grafana
- GF_PATHS_PLUGINS=/var/lib/grafana/plugins
- GF_PATHS_PROVISIONING=/etc/grafana/provisioning
hostname: rpi-grafana
image: grafana/grafana:latest
networks:
- rpimonitor_default
ports:
- 3000:3000
restart: unless-stopped
volumes:
# to be modified depending on your needs
- /path/to/your/grafana/data:/var/lib/grafana
- /path/to/your/grafana/grafana.ini:/etc/grafana/grafana.ini
- /path/to/your/grafana/provisioning:/etc/grafana/provisioning
node-exporter:
container_name: monitoring-node-exporter
expose:
- 9100
hostname: rpi-exporter
image: prom/node-exporter:latest
networks:
- rpimonitor_default
restart: unless-stopped
prometheus:
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
container_name: monitoring-prometheus
expose:
- 9090
hostname: rpi-prom
image: prom/prometheus:latest
networks:
- rpimonitor_default
restart: unless-stopped
volumes:
# to be modified depending on your needs
- /path/to/your/prometheus/data:/prometheus
- /path/to/your/prometheus/config:/etc/prometheus/
links:
- cadvisor:cadvisor
- node-exporter:node-exporter
networks:
rpimonitor_default:
external: true