Duansg opened a new pull request, #4191:
URL: https://github.com/apache/hertzbeat/pull/4191

   ## What's changed?
   
   close #3852 
   
   The issue is that the rule label routing matches `GroupAlert.commonLabels`, 
which is the intersection of all alert labels in that group. Since there are 
only grouped rules and the alert labels within the group do not match, labels 
are excluded from this intersection. As a result, the notification policy for 
that label will never match, and only the “Forward All” rule will be triggered.
   
   This PR changes the matching logic to check the alerts at the bottom of the 
group: the rule is matched when any alert in the group contains all the tags 
specified in the rule.
   
   ## Checklist
   
   - [x]  I have read the [Contributing 
Guide](https://hertzbeat.apache.org/docs/community/code_style_and_quality_guide)
   - [ ]  I have written the necessary doc or comment.
   - [x]  I have added the necessary unit tests and all cases have passed.
   
   ## Add or update API
   
   - [ ] I have added the necessary [e2e 
tests](https://github.com/apache/hertzbeat/tree/master/e2e) and all cases have 
passed.
   
   > Step1
   <img width="827" height="240" alt="capcap-260710-173741" 
src="https://github.com/user-attachments/assets/2f51b805-2876-4c73-a4e7-2419530f38ec";
 />
   
   > Step2
   <img width="1013" height="366" alt="capcap-260710-174426" 
src="https://github.com/user-attachments/assets/8f05fe35-17ac-4924-9ea0-1efe58c31738";
 />
   
   > Step3
   <img width="1070" height="396" alt="capcap-260710-174112" 
src="https://github.com/user-attachments/assets/19ac9e41-0eb3-4af5-a842-2528e1d25350";
 />
   
   > Step4
   <img width="1332" height="556" alt="capcap-260710-175749" 
src="https://github.com/user-attachments/assets/c8c35c86-576f-48f6-8d7d-061dc3d2109a";
 />
   
   > Preview
   <img width="856" height="605" alt="capcap-260710-175804" 
src="https://github.com/user-attachments/assets/f1051f62-9d64-44b3-8737-dcc07599ae9a";
 />
   


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to