added grafana and prometheus
This commit is contained in:
15
configurations/prometheus/prometheus.yml
Normal file
15
configurations/prometheus/prometheus.yml
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
global:
|
||||||
|
scrape_interval: 1m
|
||||||
|
|
||||||
|
scrape_configs:
|
||||||
|
- job_name: "prometheus"
|
||||||
|
scrape_interval: 1m
|
||||||
|
static_configs:
|
||||||
|
- targets: ["prometheus:9090"]
|
||||||
|
|
||||||
|
- job_name: "node"
|
||||||
|
static_configs:
|
||||||
|
- targets: ["node-exporter:9100"]
|
||||||
|
- job_name: "pi_node"
|
||||||
|
static_configs:
|
||||||
|
- targets: ["10.55.8.1:9100"]
|
||||||
@@ -8,3 +8,9 @@ MARIADB_ROOT_PASSWORD=testing
|
|||||||
MARIADB_DATABASE=homeassistant
|
MARIADB_DATABASE=homeassistant
|
||||||
MARIADB_USER=homeassistant_user
|
MARIADB_USER=homeassistant_user
|
||||||
MARIADB_PASSWORD=homeassistant_pw
|
MARIADB_PASSWORD=homeassistant_pw
|
||||||
|
|
||||||
|
|
||||||
|
# Grafana settings
|
||||||
|
GF_SECURITY_ADMIN_USER=test
|
||||||
|
GF_SECURITY_ADMIN_PASSWORD=test
|
||||||
|
GF_USERS_ALLOW_SIGN_UP=false
|
||||||
|
|||||||
@@ -36,3 +36,43 @@ services:
|
|||||||
- ${INTERNAL_IP}:22000:22000/udp
|
- ${INTERNAL_IP}:22000:22000/udp
|
||||||
- ${INTERNAL_IP}:21027:21027/udp
|
- ${INTERNAL_IP}:21027:21027/udp
|
||||||
restart: unless-stopped
|
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
|
||||||
|
|||||||
Reference in New Issue
Block a user