59 lines
2.1 KiB
Markdown
59 lines
2.1 KiB
Markdown
# Monitoring Stack
|
|
|
|
Zielzustand: ein zentraler Observability-Stack fuer KalliLab CORE.
|
|
|
|
## Enthaltene Dienste
|
|
|
|
- `monitoring-grafana`: zentrale UI unter `https://monitoring.kaleschke.info`
|
|
- `monitoring-prometheus`: Metriken mit 30 Tagen Retention
|
|
- `monitoring-loki`: Container-Logs mit 30 Tagen Retention
|
|
- `monitoring-promtail`: Docker-Log-Discovery ueber read-only Docker-Socket
|
|
- `monitoring-node-exporter`: Host-Metriken
|
|
- `monitoring-cadvisor`: Container-Metriken
|
|
- `monitoring-influxdb3-core`: InfluxDB 3 Core fuer Home-Assistant-/Ecowitt-Langzeitdaten
|
|
|
|
Die alten Pfade `ops/loki` und `ops/grafana-influxdb` sind damit abgeloeste Altstaende. Sie bleiben vorerst im Repo als Rollback- und Migrationsreferenz, sollen aber nach erfolgreichem Live-Deploy nicht parallel betrieben werden.
|
|
|
|
## Secrets
|
|
|
|
Vor dem Deploy muessen diese Host-Dateien existieren:
|
|
|
|
```text
|
|
/mnt/user/appdata/secrets/monitoring_grafana_admin_password.txt
|
|
/mnt/user/appdata/secrets/monitoring_grafana_influxdb_token.txt
|
|
/mnt/user/appdata/secrets/influxdb3_admin_token.json
|
|
```
|
|
|
|
Alle Dateien mit Rechten `600` anlegen. Werte niemals ins Git schreiben.
|
|
|
|
## Stack Environment
|
|
|
|
Default ist sicher lokal:
|
|
|
|
```env
|
|
INFLUXDB_BIND_IP=127.0.0.1
|
|
```
|
|
|
|
Wenn Home Assistant aus der VM schreiben soll, in Komodo fuer den `monitoring`-Stack setzen:
|
|
|
|
```env
|
|
INFLUXDB_BIND_IP=192.168.178.58
|
|
```
|
|
|
|
## Migration
|
|
|
|
1. Secrets anlegen.
|
|
2. Alten `ops/loki`-Stack stoppen, wenn `monitoring-loki` und `monitoring-promtail` live gehen.
|
|
3. Alten `ops/grafana-influxdb`-Stack stoppen, wenn `monitoring-influxdb3-core` und `monitoring-grafana` live getestet sind.
|
|
4. `monitoring` via Komodo deployen.
|
|
5. Optionales Dashboard-Bootstrap-Profil einmalig ausfuehren.
|
|
6. Home Assistant Writer gegen `http://192.168.178.58:8181/` pruefen; `401 Unauthorized` ohne Token ist erwartbar.
|
|
|
|
## Smoke-Tests
|
|
|
|
- `https://monitoring.kaleschke.info` leitet zu Authelia.
|
|
- Grafana-Datasources `Prometheus`, `Loki` und `InfluxDB 3 Core` testen erfolgreich.
|
|
- Prometheus Targets: `prometheus`, `node-exporter`, `cadvisor`, `traefik`.
|
|
- Loki zeigt Container-Logs mit Labels `container`, `compose_project`, `compose_service`.
|
|
- InfluxDB 3 Core enthaelt die Datenbank `homelab`.
|