Scrape Dawarich metrics over HTTPS
This commit is contained in:
@@ -8,7 +8,7 @@ Produktionsvorlage fuer Dawarich im KalliLab-Homelab mit GitOps ueber Gitea und
|
|||||||
- Docker Image: `freikin/dawarich:1.8.1`
|
- 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`.
|
- 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=<api-key>`
|
- Dawarich Tracking-Endpoint fuer OwnTracks: `/api/v1/owntracks/points?api_key=<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:
|
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:
|
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.
|
- `/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
|
## Grafana
|
||||||
|
|
||||||
|
|||||||
@@ -3,20 +3,15 @@
|
|||||||
# dawarich_app via SIDEKIQ_METRICS_URL.
|
# dawarich_app via SIDEKIQ_METRICS_URL.
|
||||||
#
|
#
|
||||||
# Prerequisites in monitoring/docker-compose.yml:
|
# 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`
|
# - mount Docker secret/file `/mnt/user/appdata/secrets/dawarich_metrics_password.txt`
|
||||||
# into the Prometheus container at `/run/secrets/dawarich_metrics_password`
|
# into the Prometheus container at `/run/secrets/dawarich_metrics_password`
|
||||||
|
|
||||||
- job_name: dawarich
|
- job_name: dawarich
|
||||||
metrics_path: /metrics
|
metrics_path: /metrics
|
||||||
scheme: http
|
scheme: https
|
||||||
basic_auth:
|
basic_auth:
|
||||||
username: prometheus
|
username: prometheus
|
||||||
password_file: /run/secrets/dawarich_metrics_password
|
password_file: /run/secrets/dawarich_metrics_password
|
||||||
http_headers:
|
|
||||||
X-Forwarded-Proto:
|
|
||||||
values:
|
|
||||||
- https
|
|
||||||
static_configs:
|
static_configs:
|
||||||
- targets:
|
- targets:
|
||||||
- dawarich_app:3000
|
- dawarich.kaleschke.info
|
||||||
|
|||||||
@@ -38,17 +38,14 @@ scrape_configs:
|
|||||||
|
|
||||||
- job_name: dawarich
|
- job_name: dawarich
|
||||||
metrics_path: /metrics
|
metrics_path: /metrics
|
||||||
|
scheme: https
|
||||||
basic_auth:
|
basic_auth:
|
||||||
username: prometheus
|
username: prometheus
|
||||||
password_file: /run/secrets/dawarich_metrics_password
|
password_file: /run/secrets/dawarich_metrics_password
|
||||||
http_headers:
|
|
||||||
X-Forwarded-Proto:
|
|
||||||
values:
|
|
||||||
- https
|
|
||||||
static_configs:
|
static_configs:
|
||||||
# Dawarich >= 1.7.7 serves aggregated web + Sidekiq metrics here.
|
# Dawarich >= 1.7.7 serves aggregated web + Sidekiq metrics here.
|
||||||
- targets:
|
- targets:
|
||||||
- dawarich_app:3000
|
- dawarich.kaleschke.info
|
||||||
|
|
||||||
- job_name: blackbox-http
|
- job_name: blackbox-http
|
||||||
metrics_path: /probe
|
metrics_path: /probe
|
||||||
|
|||||||
Reference in New Issue
Block a user