monitoring: Bestandsaufnahme des laufenden Stacks
Import des bisherigen Stands aus /opt/monitoring auf dem Operating-Host, unveraendert. Images auf :latest, Grafana ohne Provisioning (Datasources und Dashboards nur in der grafana.db), keine Dokumentation. Dient als Ausgangspunkt fuer den Umbau auf einen vollstaendig provisionierbaren Stack. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,100 @@
|
||||
services:
|
||||
prometheus:
|
||||
image: prom/prometheus:latest
|
||||
container_name: prometheus
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- ./prometheus/prometheus.yml:/etc/prometheus/prometheus.yml:ro
|
||||
- prometheus_data:/prometheus
|
||||
command:
|
||||
- '--config.file=/etc/prometheus/prometheus.yml'
|
||||
- '--storage.tsdb.path=/prometheus'
|
||||
- '--storage.tsdb.retention.time=45d'
|
||||
- '--storage.tsdb.retention.size=15GB'
|
||||
- '--web.enable-remote-write-receiver'
|
||||
ports:
|
||||
- "9090:9090"
|
||||
networks:
|
||||
- traefik
|
||||
|
||||
loki:
|
||||
image: grafana/loki:latest
|
||||
container_name: loki
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- ./loki/loki-config.yaml:/etc/loki/local-config.yaml:ro
|
||||
- loki_data:/loki
|
||||
command: -config.file=/etc/loki/local-config.yaml
|
||||
ports:
|
||||
- "3100:3100"
|
||||
networks:
|
||||
- traefik
|
||||
|
||||
alloy:
|
||||
image: grafana/alloy:latest
|
||||
container_name: alloy
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- ./alloy/config.alloy:/etc/alloy/config.alloy:ro
|
||||
- /var/log:/var/log:ro
|
||||
- /var/lib/docker/containers:/var/lib/docker/containers:ro
|
||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||
command: run --storage.path=/var/lib/alloy/data /etc/alloy/config.alloy
|
||||
cap_add:
|
||||
- DAC_READ_SEARCH
|
||||
- NET_RAW
|
||||
networks:
|
||||
- traefik
|
||||
depends_on:
|
||||
- prometheus
|
||||
- loki
|
||||
|
||||
grafana:
|
||||
image: grafana/grafana:latest
|
||||
container_name: grafana
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- GF_SECURITY_ADMIN_USER=${Grafana_ADMIN}
|
||||
- GF_SECURITY_ADMIN_PASSWORD=${Grafana_ADMIN_PW}
|
||||
volumes:
|
||||
- grafana_data:/var/lib/grafana
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.docker.network=traefik"
|
||||
- "traefik.http.routers.grafana.rule=Host(`selendis.axion1337.de`)"
|
||||
- "traefik.http.routers.grafana.entrypoints=websecure"
|
||||
- "traefik.http.routers.grafana.tls.certresolver=le"
|
||||
- "traefik.http.services.grafana.loadbalancer.server.port=3000"
|
||||
depends_on:
|
||||
- prometheus
|
||||
- loki
|
||||
networks:
|
||||
- traefik
|
||||
|
||||
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.sysfs=/host/sys'
|
||||
- '--path.rootfs=/rootfs'
|
||||
- '--web.listen-address=:9100'
|
||||
- '--web.disable-exporter-metrics'
|
||||
ports:
|
||||
- "9100:9100"
|
||||
networks:
|
||||
- traefik
|
||||
|
||||
volumes:
|
||||
prometheus_data:
|
||||
grafana_data:
|
||||
loki_data:
|
||||
|
||||
networks:
|
||||
traefik:
|
||||
external: true
|
||||
Reference in New Issue
Block a user