[alerter] 告警处理指标数据,告警表达式计算,内容模版关键字替换
This commit is contained in:
@@ -7,7 +7,7 @@ import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import static com.usthe.common.util.CommonConstants.SUCCESS;
|
||||
import static com.usthe.common.util.CommonConstants.SUCCESS_CODE;
|
||||
|
||||
/**
|
||||
* Unified message structure definition for front and back ends
|
||||
@@ -43,7 +43,7 @@ public class Message<T> {
|
||||
* response code, not http code
|
||||
*/
|
||||
@ApiModelProperty(value = "携带编码", position = 2)
|
||||
private byte code = SUCCESS;
|
||||
private byte code = SUCCESS_CODE;
|
||||
|
||||
public Message(String msg) {
|
||||
this.msg = msg;
|
||||
|
||||
@@ -10,57 +10,57 @@ public interface CommonConstants {
|
||||
/**
|
||||
* 响应状态码: 成功
|
||||
*/
|
||||
byte SUCCESS = 0x00;
|
||||
byte SUCCESS_CODE = 0x00;
|
||||
|
||||
/**
|
||||
* 响应状态码: 参数校验失败
|
||||
*/
|
||||
byte PARAM_INVALID = 0x01;
|
||||
byte PARAM_INVALID_CODE = 0x01;
|
||||
|
||||
/**
|
||||
* 响应状态码: 探测失败
|
||||
*/
|
||||
byte DETECT_FAILED = 0x02;
|
||||
byte DETECT_FAILED_CODE = 0x02;
|
||||
|
||||
/**
|
||||
* 响应状态码: 监控不存在
|
||||
*/
|
||||
byte MONITOR_NOT_EXIST = 0x03;
|
||||
byte MONITOR_NOT_EXIST_CODE = 0x03;
|
||||
|
||||
/**
|
||||
* 响应状态码: 监控服务冲突
|
||||
*/
|
||||
byte MONITOR_CONFLICT = 0x04;
|
||||
byte MONITOR_CONFLICT_CODE = 0x04;
|
||||
|
||||
/**
|
||||
* 响应状态码: 登陆账户密码错误
|
||||
*/
|
||||
byte MONITOR_LOGIN_FAILED = 0x05;
|
||||
byte MONITOR_LOGIN_FAILED_CODE = 0x05;
|
||||
|
||||
/**
|
||||
* 监控状态码: 未管理
|
||||
*/
|
||||
byte UN_MANAGE = 0x00;
|
||||
byte UN_MANAGE_CODE = 0x00;
|
||||
|
||||
/**
|
||||
* 监控状态码: 可用
|
||||
*/
|
||||
byte AVAILABLE = 0x01;
|
||||
byte AVAILABLE_CODE = 0x01;
|
||||
|
||||
/**
|
||||
* 监控状态码: 不可用
|
||||
*/
|
||||
byte UN_AVAILABLE = 0x02;
|
||||
byte UN_AVAILABLE_CODE = 0x02;
|
||||
|
||||
/**
|
||||
* 监控状态码: 不可达
|
||||
*/
|
||||
byte UN_REACHABLE = 0x03;
|
||||
byte UN_REACHABLE_CODE = 0x03;
|
||||
|
||||
/**
|
||||
* 监控状态码: 挂起
|
||||
*/
|
||||
byte SUSPENDING = 0x04;
|
||||
byte SUSPENDING_CODE = 0x04;
|
||||
|
||||
|
||||
/**
|
||||
@@ -82,4 +82,9 @@ public interface CommonConstants {
|
||||
* 采集指标值:null空值占位符
|
||||
*/
|
||||
String NULL_VALUE = " ";
|
||||
|
||||
/**
|
||||
* 可用性对象
|
||||
*/
|
||||
String AVAILABLE = "available";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user