-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: update all stack and new dashboard
- Loading branch information
1 parent
b6ea275
commit 6032a1b
Showing
9 changed files
with
1,367 additions
and
1,273 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Ignore IntelliJ IDEA project files | ||
.idea/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,80 +1,89 @@ | ||
version: "3" | ||
services: | ||
grafana: | ||
container_name: monitoring-grafana | ||
image: grafana/grafana:latest | ||
hostname: rpi-grafana | ||
restart: unless-stopped | ||
user: "472" | ||
networks: | ||
- internal | ||
ports: | ||
- "3000:3000" | ||
env_file: | ||
- ./grafana/.env | ||
volumes: | ||
# /!\ To be modified depending on your needs /!\ | ||
- ./grafana/data:/var/lib/grafana | ||
- ./grafana/provisioning:/etc/grafana/provisioning | ||
depends_on: | ||
- prometheus | ||
|
||
cadvisor: | ||
container_name: monitoring-cadvisor | ||
devices: | ||
- /dev/kmsg | ||
expose: | ||
- 8080 | ||
hostname: rpi-cadvisor | ||
image: zcube/cadvisor:latest | ||
ipc: shareable | ||
networks: | ||
- rpimonitor_default | ||
privileged: true | ||
hostname: rpi-cadvisor | ||
restart: unless-stopped | ||
security_opt: | ||
- label=disable | ||
privileged: true | ||
networks: | ||
- internal | ||
expose: | ||
- 8080 | ||
devices: | ||
- /dev/kmsg | ||
volumes: | ||
- /:/rootfs:ro | ||
- /var/run:/var/run:ro | ||
- /var/run:/var/run:rw | ||
- /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 | ||
- /etc/machine-id:/etc/machine-id:ro | ||
|
||
node-exporter: | ||
container_name: monitoring-node-exporter | ||
expose: | ||
- 9100 | ||
hostname: rpi-exporter | ||
image: prom/node-exporter:latest | ||
networks: | ||
- rpimonitor_default | ||
hostname: rpi-exporter | ||
restart: unless-stopped | ||
networks: | ||
- internal | ||
expose: | ||
- 9100 | ||
command: | ||
- --path.procfs=/host/proc | ||
- --path.sysfs=/host/sys | ||
- --path.rootfs=/host | ||
- --collector.filesystem.ignored-mount-points | ||
- ^/(sys|proc|dev|host|etc|rootfs/var/lib/docker/containers|rootfs/var/lib/docker/overlay2|rootfs/run/docker/netns|rootfs/var/lib/docker/aufs)($$|/) | ||
volumes: | ||
- /proc:/host/proc:ro | ||
- /sys:/host/sys:ro | ||
- /:/rootfs:ro | ||
- /:/host:ro,rslave | ||
|
||
prometheus: | ||
container_name: monitoring-prometheus | ||
image: prom/prometheus:latest | ||
hostname: rpi-prometheus | ||
restart: unless-stopped | ||
user: "nobody" | ||
command: | ||
- '--config.file=/etc/prometheus/prometheus.yml' | ||
- '--storage.tsdb.path=/prometheus' | ||
container_name: monitoring-prometheus | ||
networks: | ||
- internal | ||
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/ | ||
# /!\ To be modified depending on your needs /!\ | ||
- ./prometheus/data:/prometheus | ||
- ./prometheus:/etc/prometheus/ | ||
depends_on: | ||
- cadvisor | ||
- node-exporter | ||
links: | ||
- cadvisor:cadvisor | ||
- node-exporter:node-exporter | ||
|
||
networks: | ||
rpimonitor_default: | ||
external: true | ||
internal: | ||
driver: bridge |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
GF_SECURITY_ADMIN_USER=admin | ||
GF_SECURITY_ADMIN_PASSWORD=admin | ||
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 | ||
GF_DASHBOARDS_DEFAULT_HOME_DASHBOARD_PATH=/etc/grafana/provisioning/dashboards/Docker-Raspberry-PI-Monitoring.json |
Oops, something went wrong.