From 80e54ce57838e0b9682986a573bbc4b3d1a39c62 Mon Sep 17 00:00:00 2001 From: Oussama Douhou Date: Sat, 10 Jan 2026 14:17:31 +0100 Subject: [PATCH] docs: add logging infrastructure section to CLAUDE.md --- CLAUDE.md | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/CLAUDE.md b/CLAUDE.md index bdbe138..c1fea4f 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -379,6 +379,43 @@ Docker health check runs every 30 seconds and restarts container if unhealthy. **Key Point**: Individual DNS records are NOT created per deployment. The wildcard DNS and SSL are already configured, so Traefik automatically routes `{name}.ai.flexinit.nl` to the correct container based on hostname matching. +## Logging Infrastructure + +AI Stack logging integrates with the existing monitoring stack at `logs.intra.flexinit.nl`. + +### Components + +| Component | Location | Purpose | +|-----------|----------|---------| +| Log-ingest | `http://ai-stack-log-ingest:3000` (dokploy-network) | Receives events from AI stacks, pushes to Loki | +| Loki | `monitor-grafanaloki-qkj16i-loki-1` | Log storage | +| Grafana | https://logs.intra.flexinit.nl | Visualization | +| Dashboard | `/d/ai-stack-overview` | AI Stack metrics and logs | + +### Datasource UIDs (Grafana) +- Loki: `af9a823s6iku8b` +- Prometheus: `cf9r1fmfw9xxcf` + +### Configuration + +AI stacks send logs via environment variable: +``` +LOG_INGEST_URL=http://ai-stack-log-ingest:3000/ingest +``` + +### Local Development + +The `logging-stack/` directory contains a standalone docker-compose for local testing: +```bash +cd logging-stack && docker-compose up -d +``` + +### Credentials + +Grafana service account token stored in BWS: +- Key: `GRAFANA_OPENCODE_ACCESS_TOKEN` +- BWS ID: `c77e58e3-fb34-41dc-9824-b3ce00da18a0` + ## Project Status ✅ **Completed**: