[Bug] [Alert] Ignore alert not write info to db (#12867)

* add alert not match return info
This commit is contained in:
旺阳 2022-11-17 14:14:12 +08:00 committed by GitHub
parent 2dbc79693e
commit d02991a2e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -255,10 +255,13 @@ public final class AlertSenderService extends Thread {
}
if (!sendWarning) {
String message = String.format(
"Alert Plugin %s send ignore warning type not match: plugin warning type is %s, alert data warning type is %s",
pluginInstanceName, warningType.getCode(), alertData.getWarnType());
logger.info(
"Alert Plugin {} send ignore warning type not match: plugin warning type is {}, alert data warning type is {}",
pluginInstanceName, warningType.getCode(), alertData.getWarnType());
return null;
return new AlertResult("false", message);
}
AlertInfo alertInfo = AlertInfo.builder()