[monitor] 设计应用监控的采集定义结构yml,参数定义结构yml
This commit is contained in:
@@ -13,6 +13,12 @@
|
||||
|
||||
|
||||
<dependencies>
|
||||
<!-- spring -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<!-- etcd -->
|
||||
<dependency>
|
||||
<groupId>io.etcd</groupId>
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
package com.usthe.common.entity.dto;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* Unified message structure definition for front and back ends
|
||||
*
|
||||
* {
|
||||
* data:{....},
|
||||
* msg: message,
|
||||
* code: 3432
|
||||
* }
|
||||
* @author tomsun28
|
||||
* @date 23:48 2019/08/01
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class Message<T> {
|
||||
|
||||
/**
|
||||
* message body data
|
||||
*/
|
||||
private T data;
|
||||
|
||||
/**
|
||||
* exception message when error happen or success message
|
||||
*/
|
||||
private String msg;
|
||||
|
||||
/**
|
||||
* response code, not http code
|
||||
*/
|
||||
private Integer code;
|
||||
|
||||
}
|
||||
@@ -67,4 +67,25 @@ public class Metrics {
|
||||
* 使用公共的jdbc规范实现的数据库配置信息
|
||||
*/
|
||||
private JdbcProtocol jdbc;
|
||||
|
||||
/**
|
||||
* todo 替换指标信息
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class Field {
|
||||
/**
|
||||
* 指标名称
|
||||
*/
|
||||
private String field;
|
||||
/**
|
||||
* 指标类型 number:数字 string:字符串
|
||||
*/
|
||||
private String type;
|
||||
/**
|
||||
* 指标单位
|
||||
*/
|
||||
private String unit;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user