messere1 opened a new pull request, #425: URL: https://github.com/apache/rocketmq-dashboard/pull/425
## 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 groups - **`src/main/resources/prometheus/README.md`** — Loading instructions (prometheus.yml, Docker, Helm), threshold customization guide, and severity level documentation ## Alert Rule Categories | Category | # Rules | Key Metrics | |---|---|---| | Broker Availability | 2 | `rocketmq_broker_permission`, `rocketmq_processor_watermark` | | Proxy Availability | 2 | `rocketmq_proxy_up` | | Consumer Lag | 5 | `rocketmq_consumer_lag_messages`, `rocketmq_consumer_lag_latency`, `rocketmq_consumer_inflight_messages`, `rocketmq_consumer_queueing_latency` | | Throughput Anomalies | 3 | `rocketmq_messages_in_total`, `rocketmq_messages_out_total`, `rocketmq_send_to_dlq_messages_total` | | Connection Anomalies | 2 | `rocketmq_producer_connections`, `rocketmq_consumer_connections` | | Resource Saturation | 2 | `rocketmq_topic_number`, `rocketmq_consumer_group_number` | | Transaction Health | 2 | `rocketmq_half_messages`, `rocketmq_rollback_messages_total` | | Message Size | 1 | `rocketmq_message_size` | | Throughput Bandwidth | 2 | `rocketmq_throughput_in_total`, `rocketmq_throughput_out_total` | | Transaction Latency | 1 | `rocketmq_finish_message_latency` | ## Verifying this change All metric names and labels are verified against the official OpenTelemetry-based exporter source code: - **Broker metrics**: `broker/src/main/java/org/apache/rocketmq/broker/metrics/BrokerMetricsConstant.java` ([link](https://github.com/apache/rocketmq/blob/master/broker/src/main/java/org/apache/rocketmq/broker/metrics/BrokerMetricsConstant.java)) - **Proxy metrics**: `proxy/src/main/java/org/apache/rocketmq/proxy/metrics/ProxyMetricsConstant.java` ([link](https://github.com/apache/rocketmq/blob/master/proxy/src/main/java/org/apache/rocketmq/proxy/metrics/ProxyMetricsConstant.java)) YAML syntax validated. Each rule includes: - Threshold with comment explaining rationale - Correct label matchers using official label names - Severity classification (critical / warning) - Descriptive summary and description annotations ## How to use Load the rules in Prometheus: ```yaml # prometheus.yml rule_files: - /path/to/rocketmq-alerts.yaml ``` Reload: ```bash curl -X POST http://localhost:9090/-/reload ``` See the included `README.md` for 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 - Added `src/main/resources/prometheus/README.md` with complete loading and customization instructions. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
