Browse Source

修改报警条件

xujiaheng 3 years ago
parent
commit
dafa9291f7

+ 2 - 2
src/main/java/com/persagy/apm/alarmservice/group/alarmrule/service/impl/GroupAlarmRuleServiceImpl.java

@@ -136,7 +136,7 @@ public class GroupAlarmRuleServiceImpl extends ServiceImpl<GroupAlarmRuleMapper,
                     String replacement = equipId + "_" + infoCode;
                     backend = backend.replaceAll(infoCode, replacement);
                 }
-                cond.setEnd("!" + backend);
+                cond.setEnd("!(" + backend + ")");
                 cond.setEndUphold(0);
                 cond.setTrigger(backend);
                 cond.setTriggerUphold(alarmCondition.getTriggerUphold() * 60);
@@ -242,7 +242,7 @@ public class GroupAlarmRuleServiceImpl extends ServiceImpl<GroupAlarmRuleMapper,
                     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);