feat(observability): add RabbitMQ DLQ alerting via Prometheus + Alertmanager#19
Merged
Merged
Conversation
β¦manager Add an Alertmanager service and Prometheus alert rules so dead-letter queues, which have no consumer by design, no longer go unwatched. - Add rabbitmq-detailed scrape job hitting /metrics/detailed, since the rabbitmq_prometheus plugin's /metrics omits per-queue depth - Add alert.rules.yml: DLQ-not-empty, audit queue backlog, RabbitMQ down - Add alertmanager.yml with a no-op default receiver and Slack/email templates; wire alertmanager into docker-compose and prometheus.yml - Document the alerting setup in README (zh/en/ja) and CLAUDE.md Co-Authored-By: Claude Opus 4.8 <[email protected]>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



π Summary
Add Prometheus alert rules and an Alertmanager service so RabbitMQ dead-letter queues β which have no consumer by design β no longer go unwatched.
π― Motivation
The
audit.log.notification.dlq(andemail.notifications.dlq) hold poison messages that fail processing, but nothing observed them: there was no alerting anywhere in the stack. A silently-growing DLQ means lost audit/email events with no signal to anyone.π§ Changes
alertmanagerservice todocker-compose.yml(UI on:9093)alerting+rule_filesintoprometheus.ymlrabbitmq-detailedscrape job hitting/metrics/detailed?family=queue_coarse_metricsβ therabbitmq_prometheusplugin's default/metricsomits per-queue depth, so this is required to seerabbitmq_detailed_queue_messages{queue=...}alert.rules.ymlwith 3 rules: DLQ-not-empty (any*.dlq), audit queue backlog, RabbitMQ downalertmanager.ymlwith a no-op default receiver + commented Slack/email templatesREADME.md(zh/en/ja) andCLAUDE.mdπ§ͺ How to Test
docker compose up -d rabbitmq alertmanager prometheusPOST /api/exchanges/%2f/wallet.audit.logs.dlx/publish(routing keyaudit.logs.dead) via the RabbitMQ Management APIRabbitMQDeadLetterQueueNotEmptyshowsfiringat http://localhost:9090/alerts andactivein Alertmanager (http://localhost:9093). Purging the DLQ clears the alert.β Checklist
π€ Generated with Claude Code