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

   **Issue Evaluation**
   
   Category: `bug` | Status: **Confirmed**
   
   The reported issue has been verified against the current codebase.
   
   **Root Cause:** The PromQL expression `changes(rocketmq_producer_count[5m]) 
< -5` is unreachable. The `changes()` function returns a non-negative integer 
representing the count of value transitions within the window — it can never 
produce a negative value, so the `< -5` comparison is always false. The alert 
rule will never fire regardless of actual connection drops.
   
   **Verified locations:**
   - `server/src/main/resources/alerts/rocketmq-client-connection-drop.yaml` — 
expr: changes(rocketmq_producer_count[5m]) < -5
   - `server/scripts/gen_alert_rule_yaml.py` (line 61) — same expression in the 
generator
   - `web/src/mock/alertRuleAssets.ts` (line 141) — same expression in frontend 
mock
   
   **Impact:** The RocketMQClientConnectionDrop alert is completely 
non-functional. Production connection drops will go undetected.
   
   **Suggested fix:** Replace `changes()` with `delta()` which can represent 
actual gauge decreases, e.g.:
   ```promql
   delta(rocketmq_producer_count[5m]) < -5
   ```
   Update all three locations and add regression coverage for the rule 
expression.
   
   **Severity:** High — monitoring blind spot for connection stability.
   
   An automated fix proposal will be generated. Reply `/approve` to proceed 
with PR generation.
   
   ---
   *Automated evaluation by github-manager-bot*


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