RockteMQ-AI commented on issue #2603:
URL: 
https://github.com/apache/rocketmq-dashboard/issues/2603#issuecomment-5418124473

   **Issue Evaluation**
   
   Category: `bug` | Status: **Confirmed**
   
   The reported issue has been verified against the current codebase.
   
   **Root Cause:** The alert rule editor form (`web/src/pages/ops/alerts.tsx`) 
uses Chinese display strings (e.g., `磁盘使用率`, `5分钟`) as both `label` and `value` 
for `<Select>` options. When submitted, these Chinese values are sent to the 
backend API which expects Prometheus metric identifiers and Go-style durations. 
The backend silently falls back: invalid metrics → 
`rocketmq_consumer_lag_messages`, invalid durations → `5m`.
   
   **Affected Files:**
   - `web/src/pages/ops/alerts.tsx` — metric/duration options use Chinese as 
values (lines ~61, 63, 477, 516)
   - `web/src/pages/ops/alertRulePayload.ts` — threshold unit map keyed by 
Chinese labels (lines 18–24)
   - `server/.../AlertService.java` — `validateMetric()` fallback (lines 41, 
313–315)
   
   **Severity:** high — every metric selection silently produces a rule for the 
wrong metric.
   
   **Suggested Fix:** Separate display labels from submitted values in the 
`<Select>` options (e.g., `{ label: "磁盘使用率", value: 
"rocketmq_broker_disk_usage_percent" }`). Update `thresholdUnits` map keys 
accordingly.
   
   An automated fix proposal will be generated. Reply `/approve` to proceed 
with PR generation.
   
   ---
   *Automated evaluation by @*


-- 
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]

Reply via email to