Skip to content

feat(alerts): AlertmanagerNotificationsFailing names the reason, and has a test (#407) - #410

Merged
Gerrrt merged 1 commit into
mainfrom
gerrrt/notifications-failing-reason-407
Sep 9, 2026
Merged

feat(alerts): AlertmanagerNotificationsFailing names the reason, and has a test (#407)#410
Gerrrt merged 1 commit into
mainfrom
gerrrt/notifications-failing-reason-407

Conversation

@Gerrrt

@Gerrrt Gerrrt commented Sep 9, 2026

Copy link
Copy Markdown
Owner

The last open item on #407: AlertmanagerNotificationsFailing now puts the reason label in its summary — Alertmanager cannot deliver via webhook: rateLimited — and its description says what each reason means before the reader goes looking for a URL. On 2026-09-08 the reason was the only thing that distinguished "ntfy refused for quota" from "the webhook is down", and the old summary pointed at the wrong one.

Also adds the unit test the rule never had (the test file's header listed it among the untested four): a firing case in the incident's shape that asserts the rendered summary, and a quiet case that pins the increase() form against a counter Alertmanager exports at zero for every integration forever.

Checks: promtool test rules via the pinned image (SUCCESS), make check-docs (coverage counts 58 / 20), scripts/lint.sh.

After merge: make reload from the main checkout so Prometheus re-reads the rule.

Closes #407 — the heartbeat move in #408 was the fix; this was the annotation it left open.

🤖 Generated with Claude Code

…has a test (#407)

On 2026-09-08 this rule fired with reason="rateLimited": every receiver was
reachable and answering, and ntfy.sh was refusing with 429 because the day's
free message budget was spent. The summary said "cannot deliver via
webhook", which reads as an unreachable URL and sent the reader to the wrong
place. The reason label was the one thing that told the two failure modes
apart, so it is now in the summary, and the description says what each
reason means before the reader goes looking for a URL.

The rule had no unit test — the file header listed it among the four that
"are validated for syntax only, which is exactly the standing #63 had". It
has one now: the firing case is the incident's own shape and asserts the
rendered summary carries the reason; the quiet case pins the increase()
form against the counter Alertmanager exports at zero forever for every
integration. promtool passes; coverage counts in observability.md move to
58 tested and 20 not.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@Gerrrt
Gerrrt merged commit ab41d86 into main Sep 9, 2026
3 checks passed
@Gerrrt
Gerrrt deleted the gerrrt/notifications-failing-reason-407 branch September 9, 2026 03:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ntfy.sh's free daily quota is spent by the heartbeat — alert delivery is dead at the end of every day

1 participant