Skip to content

Commit

Permalink
[alerter] bugfix aviator expression match npe (#297)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomsun28 committed Sep 18, 2022
1 parent b5adcd1 commit 70d830f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ private void calculate(CollectRep.MetricsData metricsData) {
try {
Expression expression = AviatorEvaluator.compile(expr, true);
Boolean match = (Boolean) expression.execute(fieldValueMap);
if (match) {
if (match != null && match) {
// 阈值规则匹配,判断已触发阈值次数,触发告警
String monitorAlertKey = String.valueOf(monitorId) + define.getId();
Alert triggeredAlert = triggeredAlertMap.get(monitorAlertKey);
Expand Down

0 comments on commit 70d830f

Please sign in to comment.