Browse Source

修改报警条件

xujiaheng 3 years ago
parent
commit
c8d0405887

+ 2 - 2
src/main/java/com/persagy/apm/alarmservice/project/alarmrule/service/impl/ProjectAlarmRuleServiceImpl.java

@@ -139,7 +139,7 @@ public class ProjectAlarmRuleServiceImpl extends ServiceImpl<ProjectAlarmRuleMap
                 String replacement = equipId + "_" + infoCode;
                 backend = backend.replaceAll(infoCode, replacement);
             }
-            equipCondition.setEnd("!" + backend);
+            equipCondition.setEnd("!(" + backend+ ")");
             equipCondition.setEndUphold(0);
             equipCondition.setTrigger(backend);
             equipCondition.setTriggerUphold(alarmConditionDTO.getTriggerUphold() * 60);
@@ -271,7 +271,7 @@ public class ProjectAlarmRuleServiceImpl extends ServiceImpl<ProjectAlarmRuleMap
                 String replacement = equipId + "_" + infoCode;
                 backend = backend.replaceAll(infoCode, replacement);
             }
-            equipCondition.setEnd("!" + backend);
+            equipCondition.setEnd("!(" + backend+ ")");
             equipCondition.setEndUphold(0);
             equipCondition.setTrigger(backend);
             equipCondition.setTriggerUphold(alarmCondition.getTriggerUphold() * 60);