feat: Prometheus /metrics endpoint — Phase 5 -> 6/8
CI / test (push) Successful in 2m30s

- metrics.v: GET /metrics au format OpenMetrics (gauges + counters)
- server.v: route /metrics, Stats.http_polls counter, increment in poll loop
- metrics_test.v: test du endpoint metrics
- ROADMAP: Phase 5 6/8 (Prometheus done)
This commit is contained in:
2026-08-03 18:03:26 -04:00
parent 4150c56054
commit 83778cfb0d
4 changed files with 113 additions and 12 deletions
+8 -11
View File
@@ -106,7 +106,7 @@ Objectif : un seul binaire, une seule commande pour installer/désinstaller le s
**Sortie** : `ntfy-bridge --install-service` fonctionne sur Windows 10+, Debian 11+, Alpine 3.18+, Raspberry Pi OS (arm64). ✅
## Phase 5 : Futures idées — v0.5.0+ (4/8)
## Phase 5 : Futures idées — v0.5.0+ (6/8)
- [x] Web UI minimale — Dashboard avec statuts, historique, API endpoints
- [x] Filtres avancés — Expressions conditionnelles par source
@@ -116,20 +116,17 @@ Objectif : un seul binaire, une seule commande pour installer/désinstaller le s
- match_source: "docker"
match_name: "test-*"
action: drop
- match_source: "gitea"
action: set_priority
value: "5"
```
- Actions: `drop`, `set_priority:N`, `add_tag:X`
- Wildcard `*` supporté dans `match_name`
- [x] Notifications structurées — Support des actions Ntfy (boutons click)
- Champ `click_url` pour ouvrir une URL au clic
- Champ `actions` pour boutons d'action (view, broadcast, http)
- [ ] Intégration Prometheus — Métriques exposées au format OpenMetrics
- [x] Intégration Prometheus — Métriques exposées au format OpenMetrics
- Endpoint `GET /metrics` : gauges (uptime, poll_state, silence) + counters (notifications, errors, http_polls)
- Format compatible Prometheus/Grafana
- [x] Webhook sortant — Forwarder les événements vers Slack, Discord, JSON
```yaml
outgoing:
webhooks:
- [ ] Support multi-utilisateurs — ACLs par webhook_path
- [x] Fichier d'état — Persistance de l'état up/down des health checks
- [ ] Plugin system — Sources customisables via dll/.so
- url: "https://hooks.slack.com/..."
format: slack
- url: "https://discord.com/api/webhooks/..."
@@ -169,4 +166,4 @@ Ces features ont été ajoutées en cours de route :
| v0.3.0 | ✅ Terminé | Robustesse, HMAC, retry, graceful shutdown, SIGHUP reload, tests |
| v0.4.0 | ✅ Terminé | Templates, silence, grouping, HMAC global, CI/CD |
| v0.4.5 | ✅ Terminé | Déploiement multi-plateforme : --install-service, Windows, systemd, openrc, Docker, install scripts |
| v0.5.0+ | 🚧 4/8 | Dashboard, filtres avancés, actions Ntfy, outgoing webhooks, state file — manque Prometheus, multi-user, plugins |
| v0.5.0+ | 🚧 6/8 | Dashboard, filtres, actions Ntfy, Prometheus, outgoing webhooks, state file — manque multi-user, plugins |