[ISSUE #_METRICS-01] Add Prometheus alert rules pack for RocketMQ monitoring#425
Closed
messere1 wants to merge 2 commits into
Closed
[ISSUE #_METRICS-01] Add Prometheus alert rules pack for RocketMQ monitoring#425messere1 wants to merge 2 commits into
messere1 wants to merge 2 commits into
Conversation
…proxy Add 22 production-ready Prometheus alerting rules covering: - Broker availability (permission, processor watermark) - Proxy availability (proxy up) - Consumer lag (messages, latency, inflight, queueing) - Throughput anomalies (zero throughput, DLQ rate) - Connection anomalies (producer/consumer connections) - Resource saturation (topic/group count) - Transaction health (half messages, rollback rate) - Message size anomalies - Throughput bandwidth monitoring - Transaction finish latency All metric names and labels are sourced from the official OpenTelemetry-based exporter in BrokerMetricsConstant.java and ProxyMetricsConstant.java. Includes README with loading instructions for prometheus.yml, Docker, and Helm deployments, plus threshold customization guide. This addresses METRICS-01 task: provide out-of-the-box alert rule pack for RocketMQ monitoring.
There was a problem hiding this comment.
Pull request overview
This PR adds a Prometheus alerting rules pack (YAML) plus accompanying documentation under src/main/resources/prometheus/, intended to provide a ready-to-use set of RocketMQ 5.x operational alerts.
Changes:
- Added
rocketmq-alerts.yamlcontaining 22 Prometheus alerting rules grouped by monitoring category. - Added
README.mddocumenting metric sources, rule loading options, threshold customization, and Alertmanager integration.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/main/resources/prometheus/rocketmq-alerts.yaml | New Prometheus rule groups covering broker/proxy availability, lag, throughput, connections, resources, and transactions. |
| src/main/resources/prometheus/README.md | New usage docs for enabling metrics and loading/customizing the alert rules. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
This pull request has been automatically closed because there has been no activity for 7 days. If you would like to continue working on this, please reopen the PR with updated changes. |
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.
What is the purpose of the change
This PR adds a production-ready Prometheus alert rules pack for RocketMQ 5.x, addressing the METRICS-01 task. It provides 22 pre-configured alerting rules covering broker availability, consumer lag, throughput anomalies, connection issues, resource saturation, transaction health, and more.
Brief changelog
src/main/resources/prometheus/rocketmq-alerts.yaml— 22 Prometheus alerting rules organized into 10 groupssrc/main/resources/prometheus/README.md— Loading instructions (prometheus.yml, Docker, Helm), threshold customization guide, and severity level documentationAlert Rule Categories
rocketmq_broker_permission,rocketmq_processor_watermarkrocketmq_proxy_uprocketmq_consumer_lag_messages,rocketmq_consumer_lag_latency,rocketmq_consumer_inflight_messages,rocketmq_consumer_queueing_latencyrocketmq_messages_in_total,rocketmq_messages_out_total,rocketmq_send_to_dlq_messages_totalrocketmq_producer_connections,rocketmq_consumer_connectionsrocketmq_topic_number,rocketmq_consumer_group_numberrocketmq_half_messages,rocketmq_rollback_messages_totalrocketmq_message_sizerocketmq_throughput_in_total,rocketmq_throughput_out_totalrocketmq_finish_message_latencyVerifying this change
All metric names and labels are verified against the official OpenTelemetry-based exporter source code:
broker/src/main/java/org/apache/rocketmq/broker/metrics/BrokerMetricsConstant.java(link)proxy/src/main/java/org/apache/rocketmq/proxy/metrics/ProxyMetricsConstant.java(link)YAML syntax validated. Each rule includes:
How to use
Load the rules in Prometheus:
Reload:
See the included
README.mdfor Docker and Helm deployment instructions.Does this pull request potentially affect one of the following parts
This is a pure YAML + documentation addition. No Java code, no build changes, no runtime dependencies. None of the existing functionality is affected.
Documentation
src/main/resources/prometheus/README.mdwith complete loading and customization instructions.