fix(adr-023/024/025): restaurer diagrammes Mermaid
Les diagrammes Mermaid sont utiles pour visualiser l'architecture et ne posent pas de problème de doublon code/doc. Restauration des 3 diagrammes : - ADR-023 : Flux modération (Client → API → Worker → IA → Dashboard) - ADR-024 : Stack monitoring (Services → Prometheus/Grafana → Alerting) - ADR-025 : Architecture secrets (Dev/Prod → Vault → Encryption) Code textuel (SQL, bash, Go, YAML) reste retiré comme demandé. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -31,27 +31,64 @@ Stack **Prometheus + Grafana + Loki** self-hosted avec alerting multi-canal.
|
||||
|
||||
### Architecture
|
||||
|
||||
**Services surveillés** :
|
||||
- Backend Go API (métriques Fiber)
|
||||
- PostgreSQL (pg_exporter)
|
||||
- Redis (redis_exporter)
|
||||
- Zitadel (endpoint metrics)
|
||||
```mermaid
|
||||
graph TB
|
||||
subgraph Services["Services RoadWave"]
|
||||
API["Backend Go API<br/>(Fiber metrics)"]
|
||||
DB["PostgreSQL<br/>(pg_exporter)"]
|
||||
Redis["Redis<br/>(redis_exporter)"]
|
||||
Zitadel["Zitadel<br/>(metrics endpoint)"]
|
||||
end
|
||||
|
||||
**Stack Monitoring** :
|
||||
- **Prometheus** : Collecte métriques (scrape), stockage TSDB 15j rétention
|
||||
- **Grafana** : Visualisation dashboards
|
||||
- **Loki** : Agrégation logs (chunks compressés, 7j rétention)
|
||||
- **Alertmanager** : Routing alertes multi-canal
|
||||
- **Uptime Kuma** : Checks HTTP externes, SSL monitoring
|
||||
subgraph Monitoring["Stack Monitoring"]
|
||||
Prom["Prometheus<br/>(scrape + TSDB)"]
|
||||
Grafana["Grafana<br/>(dashboards)"]
|
||||
Loki["Loki<br/>(logs aggregation)"]
|
||||
Alert["Alertmanager<br/>(routing)"]
|
||||
Uptime["Uptime Kuma<br/>(external checks)"]
|
||||
end
|
||||
|
||||
**Alerting** :
|
||||
- Email (Brevo) : asynchrone, faible intrusivité
|
||||
- Webhook (Slack/Discord) : temps réel, on-call
|
||||
subgraph Notifications["Alerting"]
|
||||
Email["Email (Brevo)"]
|
||||
Slack["Webhook Slack/Discord"]
|
||||
end
|
||||
|
||||
**Stockage** :
|
||||
- Prometheus TSDB : métriques 15j
|
||||
- Loki chunks : logs 7j
|
||||
- Backups PostgreSQL : WAL-E continuous vers S3 OVH
|
||||
subgraph Storage["Stockage"]
|
||||
PromStorage["Prometheus TSDB<br/>(15j retention)"]
|
||||
LokiStorage["Loki Chunks<br/>(7j retention)"]
|
||||
Backups["Backups PostgreSQL<br/>(S3 OVH)"]
|
||||
end
|
||||
|
||||
API --> Prom
|
||||
DB --> Prom
|
||||
Redis --> Prom
|
||||
Zitadel --> Prom
|
||||
|
||||
API -.->|logs stdout| Loki
|
||||
Prom --> Grafana
|
||||
Loki --> Grafana
|
||||
Prom --> Alert
|
||||
|
||||
Alert --> Email
|
||||
Alert --> Slack
|
||||
|
||||
Uptime -.->|external HTTP checks| API
|
||||
Uptime --> Alert
|
||||
|
||||
Prom --> PromStorage
|
||||
Loki --> LokiStorage
|
||||
DB -.->|WAL-E continuous| Backups
|
||||
|
||||
classDef serviceStyle fill:#e3f2fd,stroke:#1565c0
|
||||
classDef monitoringStyle fill:#fff3e0,stroke:#e65100
|
||||
classDef notifStyle fill:#f3e5f5,stroke:#6a1b9a
|
||||
classDef storageStyle fill:#e8f5e9,stroke:#2e7d32
|
||||
|
||||
class Services,API,DB,Redis,Zitadel serviceStyle
|
||||
class Monitoring,Prom,Grafana,Loki,Alert,Uptime monitoringStyle
|
||||
class Notifications,Email,Slack notifStyle
|
||||
class Storage,PromStorage,LokiStorage,Backups storageStyle
|
||||
```
|
||||
|
||||
### Métriques Clés
|
||||
|
||||
|
||||
Reference in New Issue
Block a user