Aias00 opened a new issue, #1957: URL: https://github.com/apache/rocketmq-dashboard/issues/1957
## Problem The Track 1 alert-rule form uses localized display text as the API value for both `metric` and `duration`: - metric values such as `磁盘使用率` and `消费堆积量` - duration values such as `5分钟` and `15分钟` The backend contract expects a Prometheus metric identifier and Prometheus duration syntax. As a result: 1. creating or updating a rule with a duration selected in the UI is rejected with `duration is invalid`; 2. a localized metric passes through persistence, but Prometheus YAML generation later treats it as invalid and silently falls back to `rocketmq_consumer_lag_messages`, so a disk/TPS/connection rule can evaluate the wrong metric. ## Evidence - `web/src/pages/ops/alerts.tsx` defines localized strings as both Select labels and values. - `server/src/main/java/org/apache/rocketmq/studio/ops/alert/AlertRuleRequestDTO.java` accepts durations such as `5m`, not `5分钟`. - `server/src/main/java/org/apache/rocketmq/studio/ops/alert/AlertService.java` replaces invalid metric identifiers with `rocketmq_consumer_lag_messages` during export. This is distinct from #1419, which added backend input validation; the current defect is that the connected frontend still emits values that violate that contract. ## Expected behavior - Select labels may remain localized. - Submitted and persisted values use stable backend-compatible identifiers such as `rocketmq_disk_use_ratio`, `rocketmq_consumer_lag_messages`, and `5m`. - Threshold units are derived from the stable metric identifier. - Editing an existing real rule preserves backend values and can be saved successfully. ## Scope Track 1 / METRICS-01 alert-rule management. Limit the change to the web form contract and regression tests; do not change backend PromQL semantics. -- 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]
