Commit Graph
6 Commits
Author SHA1 Message Date
maxime.killinger 3d5f3c6299 feat: align Alertmanager notifications with the CrowdSec feed format
🚀 Docker Build and Push / build-and-push (push) Successful in 4m46s
Alertmanager notifications were hard to read: the alert name appeared
twice, the instance was repeated between the header and the summary, the
count was restated in the body, and details ran flat with no visual
structure.

They now follow the same grammar as the CrowdSec feed: a title carrying
the counts, then one block per alert made of an identity line
("<icon> <name> (<context>)") and details indented under a tree marker.
Severity moves into the icon (red/orange/blue, green once resolved)
instead of a "[critical]" suffix, which keeps the identity line short
enough to read at a glance on a phone.
2026-08-31 01:04:19 +02:00
maxime.killinger 0337eb3071 fix: use lowercase JSON keys matching CrowdSec's real alert schema
🚀 Docker Build and Push / build-and-push (push) Successful in 4m25s
CrowdSec's notification-http plugin serializes alerts with lowercase
keys (source/ip/cn/scenario), not the PascalCase (Source/IP/Cn/Scenario)
this code was reading. Every lookup silently fell through to its
default value, so every notification showed 'unknown' regardless of
the real IP, country or scenario. Confirmed by capturing a real payload.
2026-08-29 13:54:33 +02:00
maxime.killinger 842c8f71eb feat: add /alertmanager endpoint as Alertmanager -> Apprise bridge
🚀 Docker Build and Push / build-and-push (push) Successful in 3m30s
Reuses the same notification path as /crowdsec: formats the
Alertmanager webhook payload (firing/resolved, severity, instance,
summary/description) and forwards it to APPRISE_URL as {title, body}.
2026-08-28 22:05:30 +02:00
maxime.killinger a75c21a0bf feat: deduplicate CrowdSec alert scenarios per IP
🚀 Docker Build and Push / build-and-push (push) Successful in 2m18s
- Use a set to collect scenarios for each IP address to prevent duplicate entries (e.g., multiple 'http-probing' lists).
- Sort scenarios alphabetically for consistent notification output.
- Improve notification readability by grouping repetitive alerts.
2026-01-03 10:26:37 +01:00
maxime.killinger d180cb700c refactor: optimize docker, robust config & country handling
🚀 Docker Build and Push / build-and-push (push) Successful in 59s
- optimize(docker): use distroless/python3-debian12 & multi-stage build
- feat(app): replace Gunicorn with Waitress (pure python)
- feat(countries): replace static list with pycountry (dynamic & complete)
- feat(config): enforce mandatory APPRISE_URL (fatal if missing)
- feat(logging): add structured logging and graceful shutdown signal handling
- docs: update README with required env var and correct usage
2025-12-31 18:46:21 +01:00
maxime.killinger eef8c3835e 🎉 Initial commit: CrowdSec notification service
🚀 Docker Build and Push / build-and-push (push) Successful in 48s
2025-12-31 18:16:07 +01:00