This is an automated email from the ASF dual-hosted git repository.
gaoxihui pushed a commit to branch metric-upgrade
in repository https://gitbox.apache.org/repos/asf/ozhera.git
The following commit(s) were added to refs/heads/metric-upgrade by this push:
new 148e3fc2 feat: create and update the parameter filling project
information for alarm rules
148e3fc2 is described below
commit 148e3fc23bc69e331f7fb2224429c3adbe8630df
Author: gaoxihui <[email protected]>
AuthorDate: Fri Dec 19 10:46:17 2025 +0800
feat: create and update the parameter filling project information for alarm
rules
---
.../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]