This is an automated email from the ASF dual-hosted git repository.

zhangxiaowei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ozhera.git


The following commit(s) were added to refs/heads/master by this push:
     new 7a443129 feat: create and update the parameter filling project 
information for alarm rules (#624)
7a443129 is described below

commit 7a4431293e629e476307f25b5b28d64ec7e9f618
Author: gaoxh <[email protected]>
AuthorDate: Fri Dec 19 10:54:20 2025 +0800

    feat: create and update the parameter filling project information for alarm 
rules (#624)
    
    * refactor: Extend the Metric class to include a serverEnvId field
    
    * feat: create and update the parameter filling project information for 
alarm rules
    
    ---------
    
    Co-authored-by: gaoxihui <[email protected]>
---
 .../org/apache/ozhera/monitor/service/prometheus/AlarmService.java  | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git 
a/ozhera-monitor/ozhera-monitor-service/src/main/java/org/apache/ozhera/monitor/service/prometheus/AlarmService.java
 
b/ozhera-monitor/ozhera-monitor-service/src/main/java/org/apache/ozhera/monitor/service/prometheus/AlarmService.java
index 0040f96c..76607ede 100644
--- 
a/ozhera-monitor/ozhera-monitor-service/src/main/java/org/apache/ozhera/monitor/service/prometheus/AlarmService.java
+++ 
b/ozhera-monitor/ozhera-monitor-service/src/main/java/org/apache/ozhera/monitor/service/prometheus/AlarmService.java
@@ -216,7 +216,8 @@ public class AlarmService {
 
     public Result addRule(AppMonitor app, AppAlarmRule rule, String user, 
AlarmRuleData ruleData){
 
-
+        ruleData.setIamId(app.getIamTreeId());
+        ruleData.setProjectId(app.getProjectId());
 
         JsonObject jsonObject = new JsonObject();
 
@@ -396,6 +397,9 @@ public class AlarmService {
 
     public Result editRule(AppAlarmRule rule,AlarmRuleData ruleData,AppMonitor 
app,String user){
 
+        ruleData.setIamId(app.getIamTreeId());
+        ruleData.setProjectId(app.getProjectId());
+
         /**
          * modifiable field:
          * cname


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

Reply via email to