added grafana and prometheus

This commit is contained in:
2022-11-21 21:58:47 +01:00
parent 1e08d0c7fa
commit a010b652a3
3 changed files with 61 additions and 0 deletions

View File

@@ -8,3 +8,9 @@ MARIADB_ROOT_PASSWORD=testing
MARIADB_DATABASE=homeassistant
MARIADB_USER=homeassistant_user
MARIADB_PASSWORD=homeassistant_pw
# Grafana settings
GF_SECURITY_ADMIN_USER=test
GF_SECURITY_ADMIN_PASSWORD=test
GF_USERS_ALLOW_SIGN_UP=false

View File

@@ -36,3 +36,43 @@ services:
- ${INTERNAL_IP}:22000:22000/udp
- ${INTERNAL_IP}:21027:21027/udp
restart: unless-stopped
node-exporter:
image: prom/node-exporter:latest
container_name: node-exporter
restart: unless-stopped
volumes:
- /proc:/host/proc:ro
- /sys:/host/sys:ro
- /:/rootfs:ro
command:
- '--path.procfs=/host/proc'
- '--path.rootfs=/rootfs'
- '--path.sysfs=/host/sys'
- '--collector.filesystem.mount-points-exclude=^/(sys|proc|dev|host|etc)($$|/)'
ports:
- 9100:9100
prometheus:
image: prom/prometheus:latest
container_name: prometheus
restart: unless-stopped
volumes:
- /home/willem/repos/homeAutomation/configurations/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
- /home/willem/prometheus:/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--web.console.libraries=/etc/prometheus/console_libraries'
- '--web.console.templates=/etc/prometheus/consoles'
- '--web.enable-lifecycle'
ports:
- 9090:9090
grafana:
image: grafana/grafana:latest
environment:
env_file:
- .env
- .env.production
ports:
- 3000:3000
volumes:
- /home/willem/grafana:/var/lib/grafana