Monitoring

Monitoring

Dernière mise à jour : 2026-05-10

État actuel : minimal

L'app expose un seul endpoint health, qui sert au healthcheck Docker. Pas de Prometheus / Grafana / OpenTelemetry / Sentry actuellement.

GET /api/health

{
  "status": "ok",
  "timestamp": "2026-05-10T12:34:56.789Z"
}

Public (pas d'auth). Utilisé par le healthcheck Docker (docker-compose.yml) :

healthcheck:
  test: ["CMD", "wget", "-qO-", "http://localhost:3000/api/health"]
  interval: 30s
  timeout: 5s
  retries: 3
  start_period: 10s

Si 3 échecs consécutifs → container marqué unhealthy. Pas de restart auto en place — c'est manuel.

GET /api/admin/health (admin only)

Plus riche, utilisé par la page /admin :

{
  "qdrant": { "ok": true, "collections": 14, "stats": {...} },
  "tei": { "ok": true, "model": "BAAI/bge-m3" },
  "reranker": { "ok": true },
  "claude_ssh": { "ok": true, "latency_ms": 5234 },
  "smtp": { "ok": true, "configured": true },
  "stats": {
    "totalGames": 23,
    "totalQuestions": 542,
    "totalUsers": 3
  }
}

Si tu vois Qdrant/TEI/Reranker ok: false, le RAG est cassé. Investigation :

Ajouter un monitoring externe

Suggestions (non implémentées) :

Uptime Kuma

Prometheus + Grafana

Sentry

Alerting

Aucun alerting actuellement. Si l'app meurt à 3h du matin, tu le vois quand tu poses ta première question le lendemain.

Pour ajouter du basique :

Métriques applicatives à logger

Si tu veux instrumenter sans monitoring formel :

Ensuite tu peux faire grep + jq sur /app/data/logs/server.log pour des stats ad hoc.


Revision #1
Created 2026-05-10 15:20:12 UTC by thymon
Updated 2026-05-10 15:20:12 UTC by thymon