Files
0012/todo/04-monitoring-push-boka.md
T
Frank Schwenk 54d29d3afa docs: initial project documentation for 0012.de webspace
Document hosting setup, external monitoring architecture, landing page
concept, env template, and phased todo checklist for the wint.global
Classic 1.0 counterpart to boka.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-11 22:25:56 +02:00

56 lines
1.6 KiB
Markdown

# 04 — Monitoring Push (boka → Webspace)
**Priorität:** medium
**Abhängigkeiten:** 01, 03 (ingest + stale-Check)
**Siehe auch:** [`../MONITORING.md`](../MONITORING.md) Ebene 2
## Ziel
Interne Metriken von boka an 0012.de pushen; Alarm wenn kein Push seit 15 Min.
## Checkliste
### Webspace
- [ ] `public/ingest.php` — POST JSON, Token-Prüfung (`MONITOR_INGEST_TOKEN`)
- [ ] Payload speichern: `data/boka-status.json` + Timestamp
- [ ] In `monitor.php`: wenn `last_push` &gt; 15 Min → Alarm „boka silent“
- [ ] Schwellen optional: `disk_percent > 85`, `containers_unhealthy > 0`
- [ ] Backup-Heartbeat-Feld `backup_last_success` — Alarm wenn &gt; 25h alt (wenn Backups existieren)
### boka
- [ ] Skript `~/server/scripts/push-status.sh` (oder Pfad laut boka-Repo)
- [ ] Sammelt: load, disk %, mem, `docker ps` running/unhealthy
- [ ] POST an `MONITOR_INGEST_URL` mit curl
- [ ] Crontab: `*/5 * * * *`
- [ ] Nach erfolgreichem Backup: Push mit aktualisiertem `backup_last_success`
### Token
- [ ] Starkes Token generieren (`openssl rand -hex 32`)
- [ ] Identisch in boka (env/cron) und 0012 `.env`
## Beispiel-Payload
```json
{
"token": "...",
"load": [1.2, 0.8, 0.5],
"disk_percent": 55,
"mem_available_mb": 4700,
"containers_running": 38,
"containers_unhealthy": 0,
"backup_last_success": "2026-06-10T03:00:00+02:00"
}
```
## Akzeptanzkriterien
- Push von boka aktualisiert JSON auf Webspace
- Absichtlich gestoppter Cron auf boka → Mail nach 15+ Min
## Hinweis
Skript auf boka kann in **boka-Repo** liegen; hier nur `ingest.php` + Doku-Link.