refactoring prometheus

This commit is contained in:
2026-04-15 07:12:24 +02:00
parent 5d1de4bc4e
commit 9c283409d8
+40 -5
View File
@@ -18,17 +18,26 @@ services:
image: pdreker/fritz_exporter:2
container_name: fritz-exporter
restart: always
env_file:
- ./.env
environment:
FRITZ_HOSTNAME: '192.168.178.1'
FRITZ_USERNAME: 'fritz9297'
FRITZ_PASSWORD: 'VeNuocNuocVe26!'
FRITZ_HOSTNAME: '${FRITZ_HOSTNAME}'
FRITZ_USERNAME: '${FRITZ_USERNAME}'
FRITZ_PASSWORD: '${FRITZ_PASSWORD}'
ports:
- "9787:9787"
networks:
- back-tier
resources:
limits:
cpus: '0.2'
memory: 128M
reservations:
cpus: '0.1'
memory: 64M
prometheus:
image: prom/prometheus:latest
image: prom/prometheus:v2.54.0
volumes:
- ./prometheus/:/etc/prometheus/
- prometheus_data:/prometheus
@@ -44,13 +53,26 @@ services:
networks:
- back-tier
restart: always
healthcheck:
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:9090/-/healthy"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
resources:
limits:
cpus: '1'
memory: 1G
reservations:
cpus: '0.5'
memory: 512M
# deploy:
# placement:
# constraints:
# - node.hostname == ${HOSTNAME}
grafana:
image: grafana/grafana
image: grafana/grafana:11.0.0
user: "472"
depends_on:
- prometheus
@@ -68,6 +90,19 @@ services:
- front-tier
- proxy_tier
restart: always
healthcheck:
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:3000/api/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
resources:
limits:
cpus: '1'
memory: 512M
reservations:
cpus: '0.5'
memory: 256M
labels:
- "traefik.enable=true"
# HTTP to HTTPS Redirect