diff --git a/apps/dawarich/README.md b/apps/dawarich/README.md index 073d56b..f9c408e 100644 --- a/apps/dawarich/README.md +++ b/apps/dawarich/README.md @@ -8,7 +8,7 @@ Produktionsvorlage fuer Dawarich im KalliLab-Homelab mit GitOps ueber Gitea und - Docker Image: `freikin/dawarich:1.8.1` - Hinweis: `freika/dawarich` existiert auf Docker Hub nicht; das offizielle Image aus dem Upstream-Compose ist `freikin/dawarich`. - Dawarich Tracking-Endpoint fuer OwnTracks: `/api/v1/owntracks/points?api_key=` -- Dawarich Prometheus ab 1.7.7: `dawarich_app:3000/metrics`; Port `9394` ist intern fuer Sidekiq-Metriken. +- Dawarich Prometheus ab 1.7.7: Web-Service `/metrics`; Port `9394` ist intern fuer Sidekiq-Metriken. Quellen: @@ -75,10 +75,9 @@ Die Tracking-API-Routen fuer OwnTracks, Overland und Traccar sind separat und pr Der Monitoring-Stack ist dafuer bereits vorbereitet: -- `prometheus` haengt an `backend_net`, damit `dawarich_app` erreichbar ist. - `/mnt/user/appdata/secrets/dawarich_metrics_password.txt` ist als Docker Secret eingebunden. -Nicht `dawarich_app:9394` scrapen: das ist nach aktueller Dawarich-Doku veraltet. Der Web-Service aggregiert App- und Sidekiq-Metriken unter `dawarich_app:3000/metrics`. +Nicht `dawarich_app:9394` scrapen: das ist nach aktueller Dawarich-Doku veraltet. Der Web-Service aggregiert App- und Sidekiq-Metriken unter `/metrics`. Im KalliLab wird dieser Endpoint ueber `https://dawarich.kaleschke.info/metrics` gescraped, damit Traefik den HTTPS-Kontext setzt und Dawarich nicht auf HTTPS umleitet. ## Grafana diff --git a/apps/dawarich/prometheus-scrape.snippet.yml b/apps/dawarich/prometheus-scrape.snippet.yml index a35afaf..bb8597f 100644 --- a/apps/dawarich/prometheus-scrape.snippet.yml +++ b/apps/dawarich/prometheus-scrape.snippet.yml @@ -3,20 +3,15 @@ # dawarich_app via SIDEKIQ_METRICS_URL. # # Prerequisites in monitoring/docker-compose.yml: -# - attach service `prometheus` to external `backend_net` # - mount Docker secret/file `/mnt/user/appdata/secrets/dawarich_metrics_password.txt` # into the Prometheus container at `/run/secrets/dawarich_metrics_password` - job_name: dawarich metrics_path: /metrics - scheme: http + scheme: https basic_auth: username: prometheus password_file: /run/secrets/dawarich_metrics_password - http_headers: - X-Forwarded-Proto: - values: - - https static_configs: - targets: - - dawarich_app:3000 + - dawarich.kaleschke.info diff --git a/monitoring/prometheus/prometheus.yml b/monitoring/prometheus/prometheus.yml index 86dc6ce..7ae2e4a 100644 --- a/monitoring/prometheus/prometheus.yml +++ b/monitoring/prometheus/prometheus.yml @@ -38,17 +38,14 @@ scrape_configs: - job_name: dawarich metrics_path: /metrics + scheme: https basic_auth: username: prometheus password_file: /run/secrets/dawarich_metrics_password - http_headers: - X-Forwarded-Proto: - values: - - https static_configs: # Dawarich >= 1.7.7 serves aggregated web + Sidekiq metrics here. - targets: - - dawarich_app:3000 + - dawarich.kaleschke.info - job_name: blackbox-http metrics_path: /probe