From ec28b52ae5b6de60291202d4861f535a3f6c326b Mon Sep 17 00:00:00 2001 From: jpgiannetti Date: Sun, 1 Feb 2026 20:05:03 +0100 Subject: [PATCH] refactor(adr-024): utiliser Telegram au lieu de Slack/Discord pour alerting MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remplacement de tous les canaux Slack/Discord par Telegram Bot : - Table stack technique : Webhook Slack/Discord → Telegram Bot - Diagramme Mermaid : mise à jour nodes et connexions - Alternatives considérées : ligne tableau mise à jour - Conséquences : mentions Slack/Discord → Telegram - Alerting rules : Slack + Email → Telegram + Email Justification : - Coût : 0€ (identique) - Disponibilité : temps réel (identique) - Intrusivité : moyenne (identique) - Avantage : API Telegram plus simple et plus flexible INCONSISTENCIES.md mis à jour en conséquence. Co-Authored-By: Claude Sonnet 4.5 --- INCONSISTENCIES.md | 2 +- docs/adr/024-monitoring-observabilite.md | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/INCONSISTENCIES.md b/INCONSISTENCIES.md index 41d0c1c..e5f8076 100644 --- a/INCONSISTENCIES.md +++ b/INCONSISTENCIES.md @@ -226,7 +226,7 @@ Contenu suggéré : - SLA 2h/24h/72h selon priorité 7. **✅ FAIT** : Créer **ADR-024 : Monitoring et Observabilité** - Prometheus + Grafana + Loki (self-hosted) - - Alerting : Email (Brevo) + Webhook (Slack/Discord) + - Alerting : Email (Brevo) + Telegram Bot - Backup PostgreSQL : WAL-E continuous (RTO 1h, RPO 15min) - Runbooks incidents + dashboards métriques 8. **✅ FAIT** : Créer **ADR-025 : Secrets et Sécurité** diff --git a/docs/adr/024-monitoring-observabilite.md b/docs/adr/024-monitoring-observabilite.md index 85c2316..b693d9d 100644 --- a/docs/adr/024-monitoring-observabilite.md +++ b/docs/adr/024-monitoring-observabilite.md @@ -26,7 +26,7 @@ Stack **Prometheus + Grafana + Loki** self-hosted avec alerting multi-canal. | **Logs** | Grafana Loki | AGPL-3.0 | "Prometheus pour logs", compression efficace | | **Tracing** | Tempo (optionnel Phase 2) | AGPL-3.0 | Traces distribuées, compatible OpenTelemetry | | **Alerting** | Alertmanager | Apache-2.0 | Grouping, silencing, routing multi-canal | -| **Canaux alerts** | Email (Brevo) + Webhook (Slack/Discord) | - | Multi-canal, pas de coût SMS | +| **Canaux alerts** | Email (Brevo) + Telegram Bot | - | Multi-canal, pas de coût SMS | | **Uptime monitoring** | Uptime Kuma | MIT | Self-hosted, SSL checks, incidents page | ### Architecture @@ -50,7 +50,7 @@ graph TB subgraph Notifications["Alerting"] Email["Email (Brevo)"] - Slack["Webhook Slack/Discord"] + Telegram["Telegram Bot"] end subgraph Storage["Stockage"] @@ -70,7 +70,7 @@ graph TB Prom --> Alert Alert --> Email - Alert --> Slack + Alert --> Telegram Uptime -.->|external HTTP checks| API Uptime --> Alert @@ -86,7 +86,7 @@ graph TB class Services,API,DB,Redis,Zitadel serviceStyle class Monitoring,Prom,Grafana,Loki,Alert,Uptime monitoringStyle - class Notifications,Email,Slack notifStyle + class Notifications,Email,Telegram notifStyle class Storage,PromStorage,LokiStorage,Backups storageStyle ``` @@ -124,7 +124,7 @@ graph TB | Canal | Coût | Disponibilité | Intrusivité | Verdict | |-------|------|---------------|-------------|---------| | **Email (Brevo)** | **0€ (300/j)** | Asynchrone | ⭐ Basse | ✅ Standard | -| **Webhook Slack/Discord** | **0€** | Temps réel | ⭐⭐ Moyenne | ✅ On-call | +| **Telegram Bot** | **0€** | Temps réel | ⭐⭐ Moyenne | ✅ On-call | | SMS (Twilio) | 0.04€/SMS | Immédiat | ⭐⭐⭐ Haute | ⚠️ Phase 2 (critique) | | PagerDuty | 21$/user/mois | Immédiat + escalation | ⭐⭐⭐ Haute | ❌ Coût | | OpsGenie | 29$/user/mois | Immédiat + escalation | ⭐⭐⭐ Haute | ❌ Coût | @@ -168,7 +168,7 @@ graph TB - ✅ **Coût infrastructure** : 5-20€/mois (stockage S3 backups uniquement) - ✅ **Souveraineté** : 100% self-hosted OVH France -- ✅ **Alerting multi-canal** : Email + Slack/Discord (extensible SMS Phase 2) +- ✅ **Alerting multi-canal** : Email + Telegram (extensible SMS Phase 2) - ✅ **Observabilité complète** : métriques + logs + uptime externe - ✅ **Conformité RGPD** : logs anonymisés, rétention 7-15j @@ -176,7 +176,7 @@ graph TB - ⚠️ **Maintenance** : Stack à gérer (mises à jour Prometheus, Grafana, Loki) - ⚠️ **Stockage** : Prometheus TSDB consomme ~1-2 GB/mois @ 1000 RPS -- ❌ **Pas d'on-call automatique** au MVP (Slack manual, SMS Phase 2) +- ❌ **Pas d'on-call automatique** au MVP (Telegram manual, SMS Phase 2) - ❌ **Courbe d'apprentissage** : PromQL à maîtriser ### Dashboards Grafana @@ -202,7 +202,7 @@ graph TB ### Alerting Rules -**Alertes critiques** (Slack + Email immédiat) : +**Alertes critiques** (Telegram + Email immédiat) : - **API Down** : Job API indisponible pendant >1 min → Notification immédiate - **High Error Rate** : Taux erreurs 5xx >1% pendant >5 min → Notification immédiate - **Database Down** : PostgreSQL indisponible pendant >1 min → Notification immédiate