docs: initial architecture, roadmap, readme for ntfy-bridge
- README.md: project overview, quickstart, sources summary - ARCHITECTURE.md: complete architecture, data flow, project structure - ROADMAP.md: 5-phase development plan (v0.1.0 → v0.5.0+) - CONTRIBUTING.md: dev setup, conventions, how to add a source - ntfy-bridge.example.yaml: fully documented configuration template - scripts/example-cron-disk.sh: example cron script → ntfy-bridge
This commit is contained in:
@@ -0,0 +1,128 @@
|
||||
# ntfy-bridge configuration
|
||||
# ============================
|
||||
|
||||
# ── Server ────────────────────────────────────────────
|
||||
server:
|
||||
# URL de ton serveur Ntfy
|
||||
url: https://ntfy.dracodev.net
|
||||
|
||||
# Token d'authentification (optionnel, si ton serveur Ntfy a auth activée)
|
||||
# Peut aussi être passé via variable d'environnement NTFY_TOKEN
|
||||
# auth_token: tk_xxxxxxxxxxxx
|
||||
|
||||
# Adresse d'écoute du serveur HTTP interne
|
||||
# Mettre "0.0.0.0:9090" pour exposer réseau, "127.0.0.1:9090" pour localhost
|
||||
listen: "127.0.0.1:9090"
|
||||
|
||||
# ── Defaults ──────────────────────────────────────────
|
||||
# Appliqués à toutes les sources sauf override explicite
|
||||
defaults:
|
||||
priority: 3 # 1=min, 2=low, 3=default, 4=high, 5=urgent
|
||||
tags: ["loudspeaker"] # Tags/emojis Ntfy
|
||||
|
||||
# ── Sources ───────────────────────────────────────────
|
||||
sources:
|
||||
|
||||
# ═══════════════════════════════════════════════════
|
||||
# GITEA — webhooks depuis git.dracodev.net
|
||||
# ═══════════════════════════════════════════════════
|
||||
gitea:
|
||||
- name: "FlowDeck activity"
|
||||
webhook_path: /webhooks/gitea-flowdeck
|
||||
repo: bruno/flowdeck
|
||||
topic: dev-notifs
|
||||
priority_map:
|
||||
pull_request: 4
|
||||
issue: 3
|
||||
push: 2
|
||||
# Template de message (variables dispo: {repo}, {user}, {action}, {title}, {sha})
|
||||
template: |
|
||||
🔨 **[{repo}]** {user} {action}: "{title}"
|
||||
`{sha}`
|
||||
|
||||
- name: "ObsiGate activity"
|
||||
webhook_path: /webhooks/gitea-obsigate
|
||||
repo: bruno/obsigate
|
||||
topic: dev-notifs
|
||||
|
||||
# ═══════════════════════════════════════════════════
|
||||
# UPTIME KUMA — alertes de monitoring
|
||||
# ═══════════════════════════════════════════════════
|
||||
uptime_kuma:
|
||||
- name: "Services critiques"
|
||||
webhook_path: /webhooks/kuma-critical
|
||||
topic: alerts
|
||||
state_map:
|
||||
down: { priority: 5, tags: ["rotating_light", "x"] }
|
||||
up: { priority: 1, tags: ["white_check_mark"] }
|
||||
|
||||
# ═══════════════════════════════════════════════════
|
||||
# DOCKER — surveillance des conteneurs
|
||||
# ═══════════════════════════════════════════════════
|
||||
docker:
|
||||
- name: "Production containers"
|
||||
hosts:
|
||||
- unix:///var/run/docker.sock
|
||||
# Hôtes distants:
|
||||
# - tcp://192.168.30.101:2375
|
||||
# - tcp://192.168.30.20:2375
|
||||
events: [die, health_status, oom]
|
||||
topic: infra
|
||||
template: |
|
||||
🐳 **{container_name}** → {status}
|
||||
Image: `{image}`
|
||||
Exit code: {exit_code}
|
||||
Host: {host}
|
||||
|
||||
# ═══════════════════════════════════════════════════
|
||||
# HTTP POLL — health checks périodiques
|
||||
# ═══════════════════════════════════════════════════
|
||||
http_poll:
|
||||
- name: "Health endpoints"
|
||||
interval: 60 # secondes entre chaque check
|
||||
checks:
|
||||
- url: https://obsigate.dracodev.net/health
|
||||
topic: alerts
|
||||
priority: 5 # priorité si DOWN
|
||||
expect_status: 200
|
||||
timeout: 10 # secondes
|
||||
|
||||
- url: https://flowdeck.dracodev.net/health
|
||||
topic: alerts
|
||||
priority: 5
|
||||
expect_status: 200
|
||||
timeout: 10
|
||||
|
||||
- url: https://git.dracodev.net/api/v1/version
|
||||
topic: alerts
|
||||
priority: 5
|
||||
expect_status: 200
|
||||
timeout: 10
|
||||
|
||||
# ═══════════════════════════════════════════════════
|
||||
# CRON — reçoit des notifs depuis des scripts shell
|
||||
# ═══════════════════════════════════════════════════
|
||||
cron:
|
||||
- name: "Disk usage quotidien"
|
||||
webhook_path: /webhooks/cron-disk
|
||||
topic: daily
|
||||
|
||||
- name: "Backup report"
|
||||
webhook_path: /webhooks/cron-backup
|
||||
topic: daily
|
||||
|
||||
# ═══════════════════════════════════════════════════
|
||||
# GENERIC — webhook passe-partout
|
||||
# ═══════════════════════════════════════════════════
|
||||
generic:
|
||||
- name: "Custom alerts"
|
||||
webhook_path: /webhooks/generic
|
||||
topic: custom
|
||||
|
||||
# ── Déduplication ──────────────────────────────────────
|
||||
dedup:
|
||||
enabled: true
|
||||
ttl_seconds: 300 # 5 minutes — durée du cache de déduplication
|
||||
rate_limit:
|
||||
max_per_minute: 10 # max notifications/minute par topic
|
||||
max_per_source: 30 # max notifications/minute toute source confondue
|
||||
Reference in New Issue
Block a user