infra: integrate Keycloak monitoring, update alertmanager config, and finalize docs cleanup
All checks were successful
Build and Publish Docker Images / build-and-push (., backend/infrastructure/gateway/Dockerfile, api-gateway, api-gateway) (push) Successful in 9m22s
Build and Publish Docker Images / build-and-push (., backend/services/ping/Dockerfile, ping-service, ping-service) (push) Successful in 8m53s
Build and Publish Docker Images / build-and-push (., config/docker/caddy/web-app/Dockerfile, web-app, web-app) (push) Successful in 2m34s
Build and Publish Docker Images / build-and-push (., config/docker/keycloak/Dockerfile, keycloak, keycloak) (push) Successful in 2m10s

Added a Prometheus scrape job for Keycloak metrics. Updated Alertmanager to use Mailpit for local testing. Completed documentation consolidation and marked cleanup-related tasks as done in the master roadmap.
This commit is contained in:
Stefan Mogeritsch 2026-03-05 13:16:43 +01:00
parent 9dd6a0faf7
commit 78cda88ae6
3 changed files with 38 additions and 36 deletions

View File

@ -1,26 +1,19 @@
global:
resolve_timeout: 5m
# FIX: Hier müssen echte Werte stehen, keine Variablen!
# Wenn du noch keinen SMTP hast, trag Dummy-Werte ein, damit der Container startet.
smtp_smarthost: 'smtp.gmail.com:587'
smtp_from: 'alertmanager@meldestelle.at'
smtp_auth_username: 'deine-email@gmail.com'
smtp_auth_password: 'dein-passwort'
smtp_require_tls: true
# Wir nutzen Mailpit für lokale Tests
smtp_smarthost: 'mailpit:1025'
smtp_from: 'alertmanager@meldestelle.local'
smtp_require_tls: false
route:
group_by: ['alertname']
group_wait: 10s
group_interval: 10s
repeat_interval: 1h
receiver: 'email-notifications'
# ... (Rest bleibt gleich)
receivers:
- name: 'email-notifications'
email_configs:
- to: 'admin@meldestelle.at'
- to: 'admin@meldestelle.local'
send_resolved: true
- name: 'slack-critical'
slack_configs:
# FIX: Auch hier die echte Webhook URL eintragen oder den Block entfernen, wenn nicht genutzt
- api_url: 'https://hooks.slack.com/services/example'
channel: '#alerts-critical'
# ...

View File

@ -12,8 +12,6 @@ alerting:
alertmanagers:
- static_configs:
- targets:
# Da wir Alertmanager noch nicht im Docker Compose haben (kommt noch!),
# lassen wir das vorerst auskommentiert oder fügen den Container hinzu.
- "alertmanager:9093"
rule_files:
@ -33,7 +31,13 @@ scrape_configs:
static_configs:
- targets: [ 'consul:8500' ]
# 3. Spring Boot Services via Consul Discovery.
# 3. Keycloak Metrics (statisches Target)
- job_name: 'keycloak'
metrics_path: '/metrics'
static_configs:
- targets: [ 'keycloak:8080' ]
# 4. Spring Boot Services via Consul Discovery.
# Das ist die Magie: Prometheus fragt Consul nach allen Services.
# Wenn ein Service das Tag 'metrics' oder 'spring-boot' hat (oder einfach alle), wird er scraped.
- job_name: 'consul-services'
@ -62,7 +66,7 @@ scrape_configs:
separator: ':'
target_label: instance
# Job 4: Postgres Exporter (Statisch, da kein Consul-Client im Image)
# Job 5: Postgres Exporter (Statisch, da kein Consul-Client im Image)
- job_name: 'postgres-exporter'
static_configs:
- targets: [ 'postgres-exporter:9187' ]

View File

@ -15,28 +15,29 @@ Vollständige Migration auf Self-Hosted Infrastruktur (Gitea, Pangolin, Zora) un
* **Networking:** ✅ Pangolin Tunnel ersetzt Cloudflare.
* **CI/CD:** ✅ Gitea Actions mit ARM64-Runner (VM 102) aktiv. Docker-Publish Pipeline grün.
* **Code-Basis:** ✅ Backend (Java 25), Frontend (Kotlin/JS) bauen sauber auf ARM64.
* **Dokumentation:** ⚠️ Fragmentiert und teilweise veraltet. Muss konsolidiert werden.
* **Dokumentation:** ✅ Konsolidiert und aufgeräumt.
---
## 1. Arbeitsaufträge an die AGENTS (Phasenplan)
### PHASE 1: Documentation Cleanup (AKTUELL)
### PHASE 1: Documentation Cleanup (ABGESCHLOSSEN)
*Ziel: Eine einzige, vertrauenswürdige Quelle der Wahrheit (SSOT) schaffen.*
#### 🧹 Agent: Curator
* [ ] **Archivierung:** Veraltete Docs (Cloudflare, GitHub-Workflows, alte Roadmaps) nach `docs/_archive/` verschieben.
* [ ] **Konsolidierung:** `Zora_System_Architektur.md` als zentrale Infrastruktur-Doku etablieren.
* [ ] **Struktur:** `docs/` Ordner aufräumen (unnötige Root-Files in Unterordner).
* [ ] **Index:** `README.md` im Root als Einstiegspunkt aktualisieren.
* [x] **Archivierung:** Veraltete Docs (Cloudflare, GitHub-Workflows, alte Roadmaps) nach `docs/_archive/` verschoben.
* [x] **Konsolidierung:** `Zora_System_Architektur.md` als zentrale Infrastruktur-Doku etablieren.
* [x] **Struktur:** `docs/` Ordner aufräumen (unnötige Root-Files in Unterordner).
* [x] **Index:** `README.md` im Root als Einstiegspunkt aktualisieren.
### PHASE 2: Infrastructure Hardening
### PHASE 2: Infrastructure Hardening (ABGESCHLOSSEN)
*Ziel: Stabilisierung der neuen Self-Hosted Umgebung.*
#### 🐧 Agent: DevOps Engineer
* [ ] **Keycloak Fix:** Verbindungsprobleme innerhalb des Docker-Netzwerks (`meldestelle-host`) beheben.
* [ ] **Backup Strategy:** Automatisierte Backups für Gitea & Datenbanken auf Zora einrichten.
* [ ] **Monitoring:** Prometheus/Grafana Dashboard für Zora (System Stats, Docker Container) finalisieren.
* [x] **Keycloak Fix:** Verbindungsprobleme innerhalb des Docker-Netzwerks (`meldestelle-host`) behoben (Alias `auth.mo-code.at`).
* [x] **Backup Strategy:** Automatisierte Backups für Gitea & Datenbanken auf Zora eingerichtet (`config/scripts/backup.sh`).
* [x] **Monitoring:** Prometheus/Grafana Dashboard für Zora (System Stats, Docker Container) finalisiert (`dc-ops.yaml`).
* [x] **Deployment:** Git-basiertes Deployment-Skript (`config/scripts/deploy.sh`) erstellt.
### PHASE 3: Feature Development (ON HOLD)
*Ziel: Neuausrichtung der Fachlichkeit.*
@ -48,15 +49,19 @@ Vollständige Migration auf Self-Hosted Infrastruktur (Gitea, Pangolin, Zora) un
---
## 2. Definition of Done (für Phase 1)
1. [ ] `docs/` Root enthält nur noch essentielle Einstiegspunkte (`README.md`, `MASTER_ROADMAP.md`).
2. [ ] Alle veralteten Dokumente sind im `_archive` oder gelöscht.
3. [ ] Die `Zora_System_Architektur.md` ist korrekt in `docs/07_Infrastructure/` eingeordnet.
4. [ ] Ein neuer Entwickler findet sich sofort zurecht.
## 2. Definition of Done (für Phase 1 & 2)
1. [x] `docs/` Root enthält nur noch essentielle Einstiegspunkte (`README.md`, `MASTER_ROADMAP.md`).
2. [x] Alle veralteten Dokumente sind im `_archive` oder gelöscht.
3. [x] Die `Zora_System_Architektur.md` ist korrekt in `docs/07_Infrastructure/` eingeordnet.
4. [x] Ein neuer Entwickler findet sich sofort zurecht.
5. [x] Keycloak ist intern erreichbar.
6. [x] Backups laufen automatisch.
---
## 3. Wichtige Referenzen
* **Infrastruktur:** `docs/07_Infrastructure/Zora_System_Architektur.md` (WIP)
* **Infrastruktur:** `docs/07_Infrastructure/Zora_System_Architektur.md`
* **Deployment Guide:** `docs/07_Infrastructure/Guides/Setup_Git_Deployment_Zora.md`
* **Backup Guide:** `docs/07_Infrastructure/Guides/Setup_Backup_Zora.md`
* **CI/CD:** `.gitea/workflows/docker-publish.yaml`
* **Projekt-Protokoll:** `docs/04_Agents/Playbooks/`