Authored by jack xue

告警通知修改

... ... @@ -275,10 +275,18 @@ public class BaseLogJob implements Callable {
protected String buildAlarmMsg() {
StringBuilder builder = new StringBuilder();
builder.append("{");
if(StringUtils.equals(this.measureName,InterVar.APIACCESSMEASURE))
{
builder.append("{Warn:ApiNot200;");
}
else
{
builder.append("{Warn:ServiceNot200;");
}
builder.append("云:").append(type).append(";");
builder.append("总计:").append(this.apiSeriesModelList.size()).append(";");
builder.append("top接口:");
builder.append("Top接口:");
builder.append(this.resultList.get(0).getApiKey()).append(" : ").append(this.resultList.get(0).getApiSeriesModelList().size()).append(";");
builder.append("}");
return builder.toString();
... ...
... ... @@ -231,15 +231,15 @@ public class ErrorLogJob implements Callable {
errorSeriesModel.setMessage(oneRow.get(KINDEMAPS.get("err_msg")).toString());
if (errorSeriesModel.getMessage().contains("Lua")) {
if (errorSeriesModel.getMessage().contains("[lua]")) {
errorSeriesModel.setType("Lua");
errorSeriesModel.setType("Lua-error");
} else if (errorSeriesModel.getMessage().contains(": Connection")) {
errorSeriesModel.setType("Connection");
errorSeriesModel.setType("Connection-error");
} else {
errorSeriesModel.setType("Others");
errorSeriesModel.setType("Others-error");
}
errorSeriesModelList.add(errorSeriesModel);
... ... @@ -260,7 +260,7 @@ public class ErrorLogJob implements Callable {
private String buildAlarmMsg() {
StringBuilder builder = new StringBuilder();
builder.append("{");
builder.append("{Warn:Nginx-Error;");
builder.append("云:").append(type).append(";");
builder.append("总计:").append(this.errorSeriesModelList.size()).append(";");
List<ErrorStaModel> operList = null;
... ... @@ -270,7 +270,7 @@ public class ErrorLogJob implements Callable {
operList = InterVar.QC_NGINX_ERROR_LIST;
}
for (ErrorStaModel errorStaModel : operList) {
builder.append(errorStaModel.getType()).append(":").append(errorStaModel.getErrorSeriesModelList().size());
builder.append("Error:").append(errorStaModel.getType()).append("-").append(errorStaModel.getErrorSeriesModelList().size());
}
builder.append("}");
... ...