Procházet zdrojové kódy

迁移collector,合并到整个工程

tomsun28 před 4 roky
revize
bcea680781

+ 37 - 0
.gitignore

@@ -0,0 +1,37 @@
+target/
+!.mvn/wrapper/maven-wrapper.jar
+Thumbs.db
+.DS_Store
+.gradle
+build/
+out/
+micronaut-cli.yml
+.mvn/
+mvnw
+mvnw.bat
+.log
+
+### STS ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+
+### IntelliJ IDEA ###
+.idea
+*.iws
+*.iml
+*.ipr
+
+### NetBeans ###
+nbproject/private/
+build/
+nbbuild/
+dist/
+nbdist/
+.nb-gradle/
+
+### VS Code ###
+.vscode/

+ 207 - 0
LICENSE

@@ -0,0 +1,207 @@
+Apache License
+Version 2.0, January 2004
+http://www.apache.org/licenses/
+
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+1. Definitions.
+
+    "License" shall mean the terms and conditions for use, reproduction, and
+    distribution as defined by Sections 1 through 9 of this document.
+
+    "Licensor" shall mean the copyright owner or entity authorized by the
+    copyright owner that is granting the License.
+
+    "Legal Entity" shall mean the union of the acting entity and all other
+    entities that control, are controlled by, or are under common control with
+    that entity. For the purposes of this definition, "control" means (i) the
+    power, direct or indirect, to cause the direction or management of such
+    entity, whether by contract or otherwise, or (ii) ownership of
+    fifty percent (50%) or more of the outstanding shares, or (iii) beneficial
+    ownership of such entity.
+
+    "You" (or "Your") shall mean an individual or Legal Entity exercising
+    permissions granted by this License.
+
+    "Source" form shall mean the preferred form for making modifications,
+    including but not limited to software source code, documentation source,
+    and configuration files.
+
+    "Object" form shall mean any form resulting from mechanical transformation
+    or translation of a Source form, including but not limited to compiled
+    object code, generated documentation, and conversions to
+    other media types.
+
+    "Work" shall mean the work of authorship, whether in Source or Object
+    form, made available under the License, as indicated by a copyright notice
+    that is included in or attached to the work (an example is provided in the
+    Appendix below).
+
+    "Derivative Works" shall mean any work, whether in Source or Object form,
+    that is based on (or derived from) the Work and for which the editorial
+    revisions, annotations, elaborations, or other modifications represent,
+    as a whole, an original work of authorship. For the purposes of this
+    License, Derivative Works shall not include works that remain separable
+    from, or merely link (or bind by name) to the interfaces of, the Work and
+    Derivative Works thereof.
+
+    "Contribution" shall mean any work of authorship, including the original
+    version of the Work and any modifications or additions to that Work or
+    Derivative Works thereof, that is intentionally submitted to Licensor for
+    inclusion in the Work by the copyright owner or by an individual or
+    Legal Entity authorized to submit on behalf of the copyright owner.
+    For the purposes of this definition, "submitted" means any form of
+    electronic, verbal, or written communication sent to the Licensor or its
+    representatives, including but not limited to communication on electronic
+    mailing lists, source code control systems, and issue tracking systems
+    that are managed by, or on behalf of, the Licensor for the purpose of
+    discussing and improving the Work, but excluding communication that is
+    conspicuously marked or otherwise designated in writing by the copyright
+    owner as "Not a Contribution."
+
+    "Contributor" shall mean Licensor and any individual or Legal Entity on
+    behalf of whom a Contribution has been received by Licensor and
+    subsequently incorporated within the Work.
+
+2. Grant of Copyright License.
+
+    Subject to the terms and conditions of this License, each Contributor
+    hereby grants to You a perpetual, worldwide, non-exclusive, no-charge,
+    royalty-free, irrevocable copyright license to reproduce, prepare
+    Derivative Works of, publicly display, publicly perform, sublicense,
+    and distribute the Work and such Derivative Works in
+    Source or Object form.
+
+3. Grant of Patent License.
+
+    Subject to the terms and conditions of this License, each Contributor
+    hereby grants to You a perpetual, worldwide, non-exclusive, no-charge,
+    royalty-free, irrevocable (except as stated in this section) patent
+    license to make, have made, use, offer to sell, sell, import, and
+    otherwise transfer the Work, where such license applies only to those
+    patent claims licensable by such Contributor that are necessarily
+    infringed by their Contribution(s) alone or by combination of their
+    Contribution(s) with the Work to which such Contribution(s) was submitted.
+    If You institute patent litigation against any entity (including a
+    cross-claim or counterclaim in a lawsuit) alleging that the Work or a
+    Contribution incorporated within the Work constitutes direct or
+    contributory patent infringement, then any patent licenses granted to
+    You under this License for that Work shall terminate as of the date such
+    litigation is filed.
+
+4. Redistribution.
+
+    You may reproduce and distribute copies of the Work or Derivative Works
+    thereof in any medium, with or without modifications, and in Source or
+    Object form, provided that You meet the following conditions:
+
+    1. You must give any other recipients of the Work or Derivative Works a
+    copy of this License; and
+
+    2. You must cause any modified files to carry prominent notices stating
+    that You changed the files; and
+
+    3. You must retain, in the Source form of any Derivative Works that You
+    distribute, all copyright, patent, trademark, and attribution notices from
+    the Source form of the Work, excluding those notices that do not pertain
+    to any part of the Derivative Works; and
+
+    4. If the Work includes a "NOTICE" text file as part of its distribution,
+    then any Derivative Works that You distribute must include a readable copy
+    of the attribution notices contained within such NOTICE file, excluding
+    those notices that do not pertain to any part of the Derivative Works,
+    in at least one of the following places: within a NOTICE text file
+    distributed as part of the Derivative Works; within the Source form or
+    documentation, if provided along with the Derivative Works; or, within a
+    display generated by the Derivative Works, if and wherever such
+    third-party notices normally appear. The contents of the NOTICE file are
+    for informational purposes only and do not modify the License.
+    You may add Your own attribution notices within Derivative Works that You
+    distribute, alongside or as an addendum to the NOTICE text from the Work,
+    provided that such additional attribution notices cannot be construed
+    as modifying the License.
+
+    You may add Your own copyright statement to Your modifications and may
+    provide additional or different license terms and conditions for use,
+    reproduction, or distribution of Your modifications, or for any such
+    Derivative Works as a whole, provided Your use, reproduction, and
+    distribution of the Work otherwise complies with the conditions
+    stated in this License.
+
+5. Submission of Contributions.
+
+    Unless You explicitly state otherwise, any Contribution intentionally
+    submitted for inclusion in the Work by You to the Licensor shall be under
+    the terms and conditions of this License, without any additional
+    terms or conditions. Notwithstanding the above, nothing herein shall
+    supersede or modify the terms of any separate license agreement you may
+    have executed with Licensor regarding such Contributions.
+
+6. Trademarks.
+
+    This License does not grant permission to use the trade names, trademarks,
+    service marks, or product names of the Licensor, except as required for
+    reasonable and customary use in describing the origin of the Work and
+    reproducing the content of the NOTICE file.
+
+7. Disclaimer of Warranty.
+
+    Unless required by applicable law or agreed to in writing, Licensor
+    provides the Work (and each Contributor provides its Contributions)
+    on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
+    either express or implied, including, without limitation, any warranties
+    or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS
+    FOR A PARTICULAR PURPOSE. You are solely responsible for determining the
+    appropriateness of using or redistributing the Work and assume any risks
+    associated with Your exercise of permissions under this License.
+
+8. Limitation of Liability.
+
+    In no event and under no legal theory, whether in tort
+    (including negligence), contract, or otherwise, unless required by
+    applicable law (such as deliberate and grossly negligent acts) or agreed
+    to in writing, shall any Contributor be liable to You for damages,
+    including any direct, indirect, special, incidental, or consequential
+    damages of any character arising as a result of this License or out of
+    the use or inability to use the Work (including but not limited to damages
+    for loss of goodwill, work stoppage, computer failure or malfunction,
+    or any and all other commercial damages or losses), even if such
+    Contributor has been advised of the possibility of such damages.
+
+9. Accepting Warranty or Additional Liability.
+
+    While redistributing the Work or Derivative Works thereof, You may choose
+    to offer, and charge a fee for, acceptance of support, warranty,
+    indemnity, or other liability obligations and/or rights consistent with
+    this License. However, in accepting such obligations, You may act only
+    on Your own behalf and on Your sole responsibility, not on behalf of any
+    other Contributor, and only if You agree to indemnify, defend, and hold
+    each Contributor harmless for any liability incurred by, or claims
+    asserted against, such Contributor by reason of your accepting any such
+    warranty or additional liability.
+
+END OF TERMS AND CONDITIONS
+
+APPENDIX: How to apply the Apache License to your work
+
+    To apply the Apache License to your work, attach the following boilerplate
+    notice, with the fields enclosed by brackets "[]" replaced with your own
+    identifying information. (Don't include the brackets!) The text should be
+    enclosed in the appropriate comment syntax for the file format. We also
+    recommend that a file or class name and description of purpose be included
+    on the same "printed page" as the copyright notice for easier
+    identification within third-party archives.
+
+        Copyright tomsun28 usthe.com.
+
+        Licensed under the Apache License, Version 2.0 (the "License");
+        you may not use this file except in compliance with the License.
+        You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+        Unless required by applicable law or agreed to in writing, software
+        distributed under the License is distributed on an "AS IS" BASIS,
+        WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+        or implied. See the License for the specific language governing
+        permissions and limitations under the License.

+ 6 - 0
README.md

@@ -0,0 +1,6 @@
+## monitor 
+
+- 提供监控管理服务
+- 提供监控任务下发服务
+- 提供监控数据查询服务
+- 告警服务

+ 18 - 0
alerter/pom.xml

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>monitor</artifactId>
+        <groupId>com.usthe.tancloud</groupId>
+        <version>1.0-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>alerter</artifactId>
+
+    <properties>
+
+    </properties>
+
+</project>

+ 42 - 0
collector/README.md

@@ -0,0 +1,42 @@
+### TanCloud Collector
+
+* 操作系统
+  * Linux
+  * Windows
+  * Ubuntu
+  * CentOs
+* 数据库
+  * Mysql
+  * Oracle
+  * PostgreSQL
+* 中间件   
+  * Kafka
+  * Zookeeper
+  * RocketMq
+  * Etcd  
+* 云原生  
+  * Docker  
+  * Kubernetes  
+  * Istio  
+* 应用服务  
+  * Tomcat
+  * Jetty
+  * Http
+  * Ping
+  * 服务端口
+
+#### HELP   
+
+1. ARK插件类隔离未生效   
+> 注意需构建在jdk1.8环境中运行
+> 插件是否配置导入并配置正确
+> 本地DEBUG时需单独IDEA打开运行collector工程,不能将plugin和collector在同一工程打开运行  
+
+2. metaspace元空间内存占用多或溢出  
+> 建议调整JVM参数 ```-Dsun.reflect.inflationThreshold=100000```       
+> 由于使用太多反射,超过参数`inflationThreshold`默认值15阈值导致触发JVM反射优化(加快反射速度),
+> 反射获取类信息由使用*JNI存取器**膨胀(Inflation)*
+> 为*反射每个方法生成一个类加载器DelegatingClassLoader和Java类MethodAccessor*.    
+> 动态加载的字节码导致PermGen持续增长.   
+
+

+ 19 - 0
collector/plugins/pom.xml

@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>collector</artifactId>
+        <groupId>com.usthe.tancloud</groupId>
+        <version>1.0-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>plugins</artifactId>
+    <packaging>pom</packaging>
+    <modules>
+        <module>sample-plugin</module>
+    </modules>
+
+
+</project>

+ 48 - 0
collector/plugins/sample-plugin/pom.xml

@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>plugins</artifactId>
+        <groupId>com.usthe.tancloud</groupId>
+        <version>1.0-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>sample-plugin</artifactId>
+
+    <build>
+        <plugins>
+            <plugin>
+                <!--link https://www.sofastack.tech/projects/sofa-boot/sofa-ark-ark-plugin/ -->
+                <groupId>com.alipay.sofa</groupId>
+                <artifactId>sofa-ark-plugin-maven-plugin</artifactId>
+                <version>1.1.6</version>
+                <executions>
+                    <execution>
+                        <id>default-cli</id>
+                        <goals>
+                            <goal>ark-plugin</goal>
+                        </goals>
+
+                        <configuration>
+                            <!-- 配置优先级,数字越小,优先级越高,优先启动,优先导出类,默认1000 -->
+                            <priority>2000</priority>
+
+                            <!-- 配置导出类、资源 -->
+                            <exported>
+                                <!-- 配置类级别导出类 -->
+                                <classes>
+                                    <class>com.com.usthe.plugin.sample.ExportDemo</class>
+                                </classes>
+                            </exported>
+
+                        </configuration>
+                    </execution>
+
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>

+ 12 - 0
collector/plugins/sample-plugin/src/main/java/com/usthe/collector/plugin/SameClass.java

@@ -0,0 +1,12 @@
+package com.usthe.collector.plugin;
+
+/**
+ * @author tomsun28
+ * @date 2021/10/8 15:12
+ */
+public class SameClass {
+
+    public static String hello() {
+        return "hello plugin";
+    }
+}

+ 14 - 0
collector/plugins/sample-plugin/src/main/java/com/usthe/plugin/sample/ExportDemo.java

@@ -0,0 +1,14 @@
+package com.usthe.plugin.sample;
+
+import com.usthe.collector.plugin.SameClass;
+
+/**
+ * @author tomsun28
+ * @date 2021/10/8 15:11
+ */
+public class ExportDemo {
+
+    public String hello() {
+        return SameClass.hello();
+    }
+}

+ 18 - 0
collector/pom.xml

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>monitor</artifactId>
+        <groupId>com.usthe.tancloud</groupId>
+        <version>1.0-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>collector</artifactId>
+    <packaging>pom</packaging>
+    <modules>
+        <module>server</module>
+        <module>plugins</module>
+    </modules>
+</project>

+ 35 - 0
common/pom.xml

@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>monitor</artifactId>
+        <groupId>com.usthe.tancloud</groupId>
+        <version>1.0-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>common</artifactId>
+
+
+    <dependencies>
+        <!-- etcd -->
+        <dependency>
+            <groupId>io.etcd</groupId>
+            <artifactId>jetcd-core</artifactId>
+            <version>0.5.10</version>
+            <scope>provided</scope>
+        </dependency>
+        <!-- 工具依赖  -->
+        <dependency>
+            <groupId>com.google.guava</groupId>
+            <artifactId>guava</artifactId>
+            <version>31.0.1-jre</version>
+        </dependency>
+        <dependency>
+            <groupId>com.google.code.gson</groupId>
+            <artifactId>gson</artifactId>
+            <version>2.8.8</version>
+        </dependency>
+    </dependencies>
+</project>

+ 35 - 0
common/src/main/java/com/usthe/common/entity/job/Configmap.java

@@ -0,0 +1,35 @@
+package com.usthe.common.entity.job;
+
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+/**
+ * 监控配置参数属性及值
+ * 过程中需要将协议配置参数里面的标识符为^_^key^_^的内容替换为配置参数里的真实值
+ * @author tomsun28
+ * @date 2021/10/29 22:04
+ */
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@Builder
+public class Configmap {
+
+    /**
+     * 参数key,将协议配置参数里面的标识符为^^_key_^^的内容替换为配置参数里的真实值
+     */
+    private String key;
+
+    /**
+     * 参数value
+     */
+    private Object value;
+
+    /**
+     * number,string,secret
+     * 数字,非加密字符串,加密字符串
+     */
+    private String type;
+}

+ 162 - 0
common/src/main/java/com/usthe/common/entity/job/Job.java

@@ -0,0 +1,162 @@
+package com.usthe.common.entity.job;
+
+
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.HashSet;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+import java.util.Set;
+import java.util.stream.Collectors;
+
+/**
+ * 采集任务详情
+ * @author tomsun28
+ * @date 2021/10/17 21:19
+ */
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@Builder
+@Slf4j
+public class Job {
+
+    private static final String AVAILABILITY = "availability";
+
+    /**
+     * 任务ID
+     */
+    private long id;
+    /**
+     * 监控ID 应用ID
+     */
+    private long appId;
+    /**
+     * 监控的类型 eg: linux | mysql | jvm
+     */
+    private String app;
+    /**
+     * 任务派发开始时间戳
+     */
+    private long timestamp;
+    /**
+     * 任务采集时间间隔(单位秒) eg: 30,60,600
+     */
+    private long interval;
+    /**
+     * 是否是循环周期性任务 true为是,false为否
+     */
+    private boolean isCyclic;
+    /**
+     * 指标组配置 eg: cpu memory
+     */
+    private List<Metrics> metrics;
+    /**
+     * 监控配置参数属性及值 eg: username password timeout host
+     */
+    private List<Configmap> configmap;
+
+    /**
+     * collector使用 - 任务版本,此字段不存储于etcd
+     */
+    private transient long version;
+    /**
+     * collector使用 - 指标组任务执行优先级视图
+     * 0 - availability
+     * 1 - cpu | memory
+     * 2 - health
+     * 3 - otherMetrics
+     * ....
+     * 126 - otherMetrics
+     * 127 - lastPriorMetrics
+     */
+    private transient List<Set<Metrics>> priorMetrics;
+
+    /**
+     * collector使用 - 构造初始化标志
+     */
+    private transient boolean isConstruct = false;
+
+    /**
+     * collector使用 - 构造初始化指标组
+     */
+    public synchronized void constructMetrics() {
+        if (isConstruct) {
+            return;
+        }
+        Map<Byte, List<Metrics>> map = metrics.stream()
+                .peek(metric -> {
+                    // 判断是否配置aliasFields 没有则配置默认
+                    if (metric.getAliasFields() == null || metric.getAliasFields().isEmpty()) {
+                        metric.setAliasFields(metric.getFields());
+                    }
+                    // 设置默认的指标组执行优先级
+                    if (metric.getPriority() == null) {
+                        if (AVAILABILITY.equals(metric.getName())) {
+                            metric.setPriority((byte)0);
+                        } else {
+                            metric.setPriority(Byte.MAX_VALUE);
+                        }
+                    }
+                })
+                .collect(Collectors.groupingBy(Metrics::getPriority));
+        // 构造指标组任务执行顺序链表
+        priorMetrics = new LinkedList<>();
+        map.values().forEach(metric -> {
+            Set<Metrics> metricsSet = new HashSet<>(metric);
+            priorMetrics.add(metricsSet);
+        });
+        priorMetrics.sort(Comparator.comparing(e -> {
+            Optional<Metrics> metric = e.stream().findAny();
+            if (metric.isPresent()) {
+                return metric.get().getPriority();
+            } else {
+                return Byte.MAX_VALUE;
+            }
+        }));
+    }
+
+    /**
+     * collector使用 - 获取下一组优先级的指标组任务
+     * @param metrics 当前指标组
+     * @param first 是否是第一次获取
+     * @return 指标组任务
+     * 返回null表示:job已完成,所有指标组采集结束
+     * 返回empty的集合表示:当前级别下还有指标组采集任务未结束,无法进行下一级别的指标组任务采集
+     * 返回有数据集合表示:获取到下一组优先级的指标组任务
+     */
+    public synchronized Set<Metrics> getNextCollectMetrics(Metrics metrics, boolean first) {
+        if (!isConstruct || priorMetrics == null || priorMetrics.isEmpty()) {
+            return null;
+        }
+        Set<Metrics> metricsSet = priorMetrics.get(0);
+        if (first) {
+            log.error("metrics must has one [availability] metrics at least.");
+            return metricsSet;
+        }
+        if (metrics == null) {
+            log.error("metrics can not null when not first get");
+        }
+        if (metrics != null && !metricsSet.remove(metrics)) {
+            log.error("Job {} appId {} app {} metrics {} remove empty error in priorMetrics.",
+                    id, appId, app, metrics.getName());
+        }
+        if (metricsSet.isEmpty()) {
+            if (priorMetrics.size() == 1) {
+                return null;
+            }
+            priorMetrics.remove(0);
+            return priorMetrics.get(0);
+        } else {
+            return Collections.emptySet();
+        }
+    }
+}

+ 70 - 0
common/src/main/java/com/usthe/common/entity/job/Metrics.java

@@ -0,0 +1,70 @@
+package com.usthe.common.entity.job;
+
+import com.usthe.common.entity.job.protocol.HttpProtocol;
+import com.usthe.common.entity.job.protocol.IcmpProtocol;
+import com.usthe.common.entity.job.protocol.JdbcProtocol;
+import com.usthe.common.entity.job.protocol.TcpUdpProtocol;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.util.List;
+
+/**
+ * 监控采集的指标集合详情 eg: cpu | memory | health
+ * @author tomsun28
+ * @date 2021/10/17 21:24
+ */
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@Builder
+public class Metrics {
+
+    /**
+     * 公共属性-名称 eg: cpu | memory | health
+     */
+    private String name;
+    /**
+     * 公共属性-采集监控协议 eg: sql, ssh, http, telnet, wmi, snmp, sdk
+     */
+    private String protocol;
+    /**
+     * 范围(0-127)指标组调度优先级,数值越小优先级越高
+     * 优先级高的调度采集完成后才会调度下一优先级的指标组采集任务
+     * 可用性指标组(availability)默认优先级为0,其它普通指标组范围为1-127,即需要等availability采集成功后才会调度后面的指标组任务
+     */
+    private Byte priority;
+    /**
+     * 公共属性-采集监控的最终结果属性集合 eg: speed | times | size
+     */
+    private List<String> fields;
+    /**
+     * 公共属性-采集监控的前置查询属性集合 eg: size1 | size2 | speedSize
+     */
+    private List<String> aliasFields;
+    /**
+     * 公共属性-表达式计算,将前置查询属性(preFields)与最终属性(fields)映射,计算出最终属性(fields)值
+     * eg: size = size1 + size2, speed = speedSize
+     * https://www.yuque.com/boyan-avfmj/aviatorscript/ban32m
+     */
+    private List<String> calculates;
+
+    /**
+     * 使用http协议的监控配置信息
+     */
+    private HttpProtocol http;
+    /**
+     * 使用icmp协议进行ping的监控配置信息
+     */
+    private IcmpProtocol icmp;
+    /**
+     * 使用socket实现的tcp或ucp进行服务端口探测配置信息
+     */
+    private TcpUdpProtocol tcpUdp;
+    /**
+     * 使用公共的jdbc规范实现的数据库配置信息
+     */
+    private JdbcProtocol jdbc;
+}

+ 93 - 0
common/src/main/java/com/usthe/common/entity/job/protocol/HttpProtocol.java

@@ -0,0 +1,93 @@
+package com.usthe.common.entity.job.protocol;
+
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.util.Map;
+
+/**
+ * http 协议配置
+ * @author tomsun28
+ * @date 2021/10/31 12:41
+ */
+@Data
+@Builder
+@AllArgsConstructor
+@NoArgsConstructor
+public class HttpProtocol {
+    /**
+     * 对端主机ip或域名
+     */
+    private String host;
+    /**
+     * http/https 请求访问的url链接
+     */
+    private String url;
+    /**
+     * http是否使用链路加密ssl/tls,即是http还是https
+     */
+    private boolean ssl = false;
+    /**
+     * http请求方法: get, post, put, delete, patch
+     */
+    private String method;
+    /**
+     * http请求携带头 eg: Content-Type = application/json
+     */
+    private Map<String, String> headers;
+    /**
+     * http请求携带查询参数 eg: localhost:80/api?paramKey=value
+     */
+    private Map<String, String> params;
+    /**
+     * 认证信息
+     */
+    private Authorization authorization;
+    /**
+     * 响应数据解析方式
+     * default - 自有的数据解析规则
+     * json_path 自定义jsonPath脚本 https://www.jsonpath.cn/
+     * xml_path 自定义xmlPath脚本
+     * prometheus Prometheus数据规则
+     */
+    private String parseType;
+    /**
+     * 数据解析脚本 当解析方式为 jsonPath or xmlPath时存在
+     */
+    private String parseScript;
+
+    /**
+     * 认证信息
+     */
+    @Data
+    @AllArgsConstructor
+    @NoArgsConstructor
+    public class Authorization {
+        /**
+         * 认证类型:Bearer Token, Basic Auth, Digest Auth
+         */
+        private String type;
+        /**
+         * Bearer Token's token
+         */
+        private String bearerTokenToken;
+        /**
+         * Basic Auth's username
+         */
+        private String basicAuthUsername;
+        /**
+         * Basic Auth's password
+         */
+        private String basicAuthPassword;
+        /**
+         * Digest Auth's username
+         */
+        private String digestAuthUsername;
+        /**
+         * Digest Auth's password
+         */
+        private String digestAuthPassword;
+    }
+}

+ 23 - 0
common/src/main/java/com/usthe/common/entity/job/protocol/IcmpProtocol.java

@@ -0,0 +1,23 @@
+package com.usthe.common.entity.job.protocol;
+
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+/**
+ * icmp(即ping)协议配置
+ * @author tomsun28
+ * @date 2021/10/31 16:41
+ */
+@Data
+@Builder
+@AllArgsConstructor
+@NoArgsConstructor
+public class IcmpProtocol {
+    /**
+     * 对端主机ip或域名
+     */
+    private String host;
+
+}

+ 38 - 0
common/src/main/java/com/usthe/common/entity/job/protocol/JdbcProtocol.java

@@ -0,0 +1,38 @@
+package com.usthe.common.entity.job.protocol;
+
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+/**
+ * 公共的jdbc规范实现的数据库配置信息
+ * @author tomsun28
+ * @date 2021/10/31 17:33
+ */
+@Data
+@Builder
+@AllArgsConstructor
+@NoArgsConstructor
+public class JdbcProtocol {
+    /**
+     * 对端主机ip或域名
+     */
+    private String host;
+    /**
+     * 端口号
+     */
+    private Integer port;
+    /**
+     * 数据库用户名(可选)
+     */
+    private String username;
+    /**
+     * 数据库密码(可选)
+     */
+    private String password;
+    /**
+     * 数据库链接url eg: jdbc:mysql://localhost:3306
+     */
+    private String url;
+}

+ 30 - 0
common/src/main/java/com/usthe/common/entity/job/protocol/TcpUdpProtocol.java

@@ -0,0 +1,30 @@
+package com.usthe.common.entity.job.protocol;
+
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+/**
+ * 使用socket实现的tcp或ucp进行服务端口可用性探测
+ * @author tomsun28
+ * @date 2021/10/31 17:27
+ */
+@Data
+@Builder
+@AllArgsConstructor
+@NoArgsConstructor
+public class TcpUdpProtocol {
+    /**
+     * 具体协议类型 tcp, udp
+     */
+    private String protocol;
+    /**
+     * 对端主机ip或域名
+     */
+    private String host;
+    /**
+     * 端口号
+     */
+    private Integer port;
+}

+ 3225 - 0
common/src/main/java/com/usthe/common/entity/message/CollectRep.java

@@ -0,0 +1,3225 @@
+// Generated by the protocol buffer compiler.  DO NOT EDIT!
+// source: collect_rep.proto
+
+package com.usthe.common.entity.message;
+
+@SuppressWarnings("PMD")
+public final class CollectRep {
+  private CollectRep() {}
+  public static void registerAllExtensions(
+      com.google.protobuf.ExtensionRegistryLite registry) {
+  }
+
+  public static void registerAllExtensions(
+      com.google.protobuf.ExtensionRegistry registry) {
+    registerAllExtensions(
+        (com.google.protobuf.ExtensionRegistryLite) registry);
+  }
+  /**
+   * Protobuf enum {@code com.usthe.common.entity.message.Code}
+   */
+  public enum Code
+      implements com.google.protobuf.ProtocolMessageEnum {
+    /**
+     * <pre>
+     * 采集成功
+     * </pre>
+     *
+     * <code>SUCCESS = 0;</code>
+     */
+    SUCCESS(0),
+    /**
+     * <pre>
+     * 采集器不可用
+     * </pre>
+     *
+     * <code>UN_AVAILABLE = 1;</code>
+     */
+    UN_AVAILABLE(1),
+    /**
+     * <pre>
+     * 对端不可达(网络层icmp)
+     * </pre>
+     *
+     * <code>UN_REACHABLE = 2;</code>
+     */
+    UN_REACHABLE(2),
+    /**
+     * <pre>
+     * 对端连接失败(传输层tcp,udp)
+     * </pre>
+     *
+     * <code>UN_CONNECTABLE = 3;</code>
+     */
+    UN_CONNECTABLE(3),
+    /**
+     * <pre>
+     * 数据采集失败(应用层http,ssh,snmp)
+     * </pre>
+     *
+     * <code>FAIL = 4;</code>
+     */
+    FAIL(4),
+    /**
+     * <pre>
+     * 采集超时
+     * </pre>
+     *
+     * <code>TIMEOUT = 5;</code>
+     */
+    TIMEOUT(5),
+    UNRECOGNIZED(-1),
+    ;
+
+    /**
+     * <pre>
+     * 采集成功
+     * </pre>
+     *
+     * <code>SUCCESS = 0;</code>
+     */
+    public static final int SUCCESS_VALUE = 0;
+    /**
+     * <pre>
+     * 采集器不可用
+     * </pre>
+     *
+     * <code>UN_AVAILABLE = 1;</code>
+     */
+    public static final int UN_AVAILABLE_VALUE = 1;
+    /**
+     * <pre>
+     * 对端不可达(网络层icmp)
+     * </pre>
+     *
+     * <code>UN_REACHABLE = 2;</code>
+     */
+    public static final int UN_REACHABLE_VALUE = 2;
+    /**
+     * <pre>
+     * 对端连接失败(传输层tcp,udp)
+     * </pre>
+     *
+     * <code>UN_CONNECTABLE = 3;</code>
+     */
+    public static final int UN_CONNECTABLE_VALUE = 3;
+    /**
+     * <pre>
+     * 数据采集失败(应用层http,ssh,snmp)
+     * </pre>
+     *
+     * <code>FAIL = 4;</code>
+     */
+    public static final int FAIL_VALUE = 4;
+    /**
+     * <pre>
+     * 采集超时
+     * </pre>
+     *
+     * <code>TIMEOUT = 5;</code>
+     */
+    public static final int TIMEOUT_VALUE = 5;
+
+
+    public final int getNumber() {
+      if (this == UNRECOGNIZED) {
+        throw new java.lang.IllegalArgumentException(
+            "Can't get the number of an unknown enum value.");
+      }
+      return value;
+    }
+
+    /**
+     * @param value The numeric wire value of the corresponding enum entry.
+     * @return The enum associated with the given numeric wire value.
+     * @deprecated Use {@link #forNumber(int)} instead.
+     */
+    @java.lang.Deprecated
+    public static Code valueOf(int value) {
+      return forNumber(value);
+    }
+
+    /**
+     * @param value The numeric wire value of the corresponding enum entry.
+     * @return The enum associated with the given numeric wire value.
+     */
+    public static Code forNumber(int value) {
+      switch (value) {
+        case 0: return SUCCESS;
+        case 1: return UN_AVAILABLE;
+        case 2: return UN_REACHABLE;
+        case 3: return UN_CONNECTABLE;
+        case 4: return FAIL;
+        case 5: return TIMEOUT;
+        default: return null;
+      }
+    }
+
+    public static com.google.protobuf.Internal.EnumLiteMap<Code>
+        internalGetValueMap() {
+      return internalValueMap;
+    }
+    private static final com.google.protobuf.Internal.EnumLiteMap<
+        Code> internalValueMap =
+          new com.google.protobuf.Internal.EnumLiteMap<Code>() {
+            public Code findValueByNumber(int number) {
+              return Code.forNumber(number);
+            }
+          };
+
+    public final com.google.protobuf.Descriptors.EnumValueDescriptor
+        getValueDescriptor() {
+      if (this == UNRECOGNIZED) {
+        throw new java.lang.IllegalStateException(
+            "Can't get the descriptor of an unrecognized enum value.");
+      }
+      return getDescriptor().getValues().get(ordinal());
+    }
+    public final com.google.protobuf.Descriptors.EnumDescriptor
+        getDescriptorForType() {
+      return getDescriptor();
+    }
+    public static final com.google.protobuf.Descriptors.EnumDescriptor
+        getDescriptor() {
+      return com.usthe.common.entity.message.CollectRep.getDescriptor().getEnumTypes().get(0);
+    }
+
+    private static final Code[] VALUES = values();
+
+    public static Code valueOf(
+        com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
+      if (desc.getType() != getDescriptor()) {
+        throw new java.lang.IllegalArgumentException(
+          "EnumValueDescriptor is not for this type.");
+      }
+      if (desc.getIndex() == -1) {
+        return UNRECOGNIZED;
+      }
+      return VALUES[desc.getIndex()];
+    }
+
+    private final int value;
+
+    private Code(int value) {
+      this.value = value;
+    }
+
+    // @@protoc_insertion_point(enum_scope:com.usthe.common.entity.message.Code)
+  }
+
+  public interface MetricsDataOrBuilder extends
+      // @@protoc_insertion_point(interface_extends:com.usthe.common.entity.message.MetricsData)
+      com.google.protobuf.MessageOrBuilder {
+
+    /**
+     * <pre>
+     * 监控的ID
+     * </pre>
+     *
+     * <code>uint64 id = 1;</code>
+     * @return The id.
+     */
+    long getId();
+
+    /**
+     * <pre>
+     * 监控的类型 eg: linux | mysql | jvm
+     * </pre>
+     *
+     * <code>string app = 2;</code>
+     * @return The app.
+     */
+    java.lang.String getApp();
+    /**
+     * <pre>
+     * 监控的类型 eg: linux | mysql | jvm
+     * </pre>
+     *
+     * <code>string app = 2;</code>
+     * @return The bytes for app.
+     */
+    com.google.protobuf.ByteString
+        getAppBytes();
+
+    /**
+     * <pre>
+     * 监控采集的指标集合 eg: cpu | memory | health
+     * </pre>
+     *
+     * <code>string metrics = 3;</code>
+     * @return The metrics.
+     */
+    java.lang.String getMetrics();
+    /**
+     * <pre>
+     * 监控采集的指标集合 eg: cpu | memory | health
+     * </pre>
+     *
+     * <code>string metrics = 3;</code>
+     * @return The bytes for metrics.
+     */
+    com.google.protobuf.ByteString
+        getMetricsBytes();
+
+    /**
+     * <pre>
+     * 采集时间
+     * </pre>
+     *
+     * <code>uint64 time = 4;</code>
+     * @return The time.
+     */
+    long getTime();
+
+    /**
+     * <pre>
+     * 采集响应码
+     * </pre>
+     *
+     * <code>.com.usthe.common.entity.message.Code code = 5;</code>
+     * @return The enum numeric value on the wire for code.
+     */
+    int getCodeValue();
+    /**
+     * <pre>
+     * 采集响应码
+     * </pre>
+     *
+     * <code>.com.usthe.common.entity.message.Code code = 5;</code>
+     * @return The code.
+     */
+    com.usthe.common.entity.message.CollectRep.Code getCode();
+
+    /**
+     * <pre>
+     * 采集响应信息
+     * </pre>
+     *
+     * <code>string msg = 6;</code>
+     * @return The msg.
+     */
+    java.lang.String getMsg();
+    /**
+     * <pre>
+     * 采集响应信息
+     * </pre>
+     *
+     * <code>string msg = 6;</code>
+     * @return The bytes for msg.
+     */
+    com.google.protobuf.ByteString
+        getMsgBytes();
+
+    /**
+     * <pre>
+     * 采集指标名
+     * </pre>
+     *
+     * <code>repeated string fields = 7;</code>
+     * @return A list containing the fields.
+     */
+    java.util.List<java.lang.String>
+        getFieldsList();
+    /**
+     * <pre>
+     * 采集指标名
+     * </pre>
+     *
+     * <code>repeated string fields = 7;</code>
+     * @return The count of fields.
+     */
+    int getFieldsCount();
+    /**
+     * <pre>
+     * 采集指标名
+     * </pre>
+     *
+     * <code>repeated string fields = 7;</code>
+     * @param index The index of the element to return.
+     * @return The fields at the given index.
+     */
+    java.lang.String getFields(int index);
+    /**
+     * <pre>
+     * 采集指标名
+     * </pre>
+     *
+     * <code>repeated string fields = 7;</code>
+     * @param index The index of the value to return.
+     * @return The bytes of the fields at the given index.
+     */
+    com.google.protobuf.ByteString
+        getFieldsBytes(int index);
+
+    /**
+     * <pre>
+     * 采集指标值集合(fields作为字段名称与ValueRow映射)
+     * </pre>
+     *
+     * <code>repeated .com.usthe.common.entity.message.ValueRow values = 8;</code>
+     */
+    java.util.List<com.usthe.common.entity.message.CollectRep.ValueRow> 
+        getValuesList();
+    /**
+     * <pre>
+     * 采集指标值集合(fields作为字段名称与ValueRow映射)
+     * </pre>
+     *
+     * <code>repeated .com.usthe.common.entity.message.ValueRow values = 8;</code>
+     */
+    com.usthe.common.entity.message.CollectRep.ValueRow getValues(int index);
+    /**
+     * <pre>
+     * 采集指标值集合(fields作为字段名称与ValueRow映射)
+     * </pre>
+     *
+     * <code>repeated .com.usthe.common.entity.message.ValueRow values = 8;</code>
+     */
+    int getValuesCount();
+    /**
+     * <pre>
+     * 采集指标值集合(fields作为字段名称与ValueRow映射)
+     * </pre>
+     *
+     * <code>repeated .com.usthe.common.entity.message.ValueRow values = 8;</code>
+     */
+    java.util.List<? extends com.usthe.common.entity.message.CollectRep.ValueRowOrBuilder> 
+        getValuesOrBuilderList();
+    /**
+     * <pre>
+     * 采集指标值集合(fields作为字段名称与ValueRow映射)
+     * </pre>
+     *
+     * <code>repeated .com.usthe.common.entity.message.ValueRow values = 8;</code>
+     */
+    com.usthe.common.entity.message.CollectRep.ValueRowOrBuilder getValuesOrBuilder(
+        int index);
+  }
+  /**
+   * Protobuf type {@code com.usthe.common.entity.message.MetricsData}
+   */
+  public static final class MetricsData extends
+      com.google.protobuf.GeneratedMessageV3 implements
+      // @@protoc_insertion_point(message_implements:com.usthe.common.entity.message.MetricsData)
+      MetricsDataOrBuilder {
+  private static final long serialVersionUID = 0L;
+    // Use MetricsData.newBuilder() to construct.
+    private MetricsData(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
+      super(builder);
+    }
+    private MetricsData() {
+      app_ = "";
+      metrics_ = "";
+      code_ = 0;
+      msg_ = "";
+      fields_ = com.google.protobuf.LazyStringArrayList.EMPTY;
+      values_ = java.util.Collections.emptyList();
+    }
+
+    @java.lang.Override
+    @SuppressWarnings({"unused"})
+    protected java.lang.Object newInstance(
+        UnusedPrivateParameter unused) {
+      return new MetricsData();
+    }
+
+    @java.lang.Override
+    public final com.google.protobuf.UnknownFieldSet
+    getUnknownFields() {
+      return this.unknownFields;
+    }
+    private MetricsData(
+        com.google.protobuf.CodedInputStream input,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      this();
+      if (extensionRegistry == null) {
+        throw new java.lang.NullPointerException();
+      }
+      int mutable_bitField0_ = 0;
+      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+          com.google.protobuf.UnknownFieldSet.newBuilder();
+      try {
+        boolean done = false;
+        while (!done) {
+          int tag = input.readTag();
+          switch (tag) {
+            case 0:
+              done = true;
+              break;
+            case 8: {
+
+              id_ = input.readUInt64();
+              break;
+            }
+            case 18: {
+              java.lang.String s = input.readStringRequireUtf8();
+
+              app_ = s;
+              break;
+            }
+            case 26: {
+              java.lang.String s = input.readStringRequireUtf8();
+
+              metrics_ = s;
+              break;
+            }
+            case 32: {
+
+              time_ = input.readUInt64();
+              break;
+            }
+            case 40: {
+              int rawValue = input.readEnum();
+
+              code_ = rawValue;
+              break;
+            }
+            case 50: {
+              java.lang.String s = input.readStringRequireUtf8();
+
+              msg_ = s;
+              break;
+            }
+            case 58: {
+              java.lang.String s = input.readStringRequireUtf8();
+              if (!((mutable_bitField0_ & 0x00000001) != 0)) {
+                fields_ = new com.google.protobuf.LazyStringArrayList();
+                mutable_bitField0_ |= 0x00000001;
+              }
+              fields_.add(s);
+              break;
+            }
+            case 66: {
+              if (!((mutable_bitField0_ & 0x00000002) != 0)) {
+                values_ = new java.util.ArrayList<com.usthe.common.entity.message.CollectRep.ValueRow>();
+                mutable_bitField0_ |= 0x00000002;
+              }
+              values_.add(
+                  input.readMessage(com.usthe.common.entity.message.CollectRep.ValueRow.parser(), extensionRegistry));
+              break;
+            }
+            default: {
+              if (!parseUnknownField(
+                  input, unknownFields, extensionRegistry, tag)) {
+                done = true;
+              }
+              break;
+            }
+          }
+        }
+      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+        throw e.setUnfinishedMessage(this);
+      } catch (java.io.IOException e) {
+        throw new com.google.protobuf.InvalidProtocolBufferException(
+            e).setUnfinishedMessage(this);
+      } finally {
+        if (((mutable_bitField0_ & 0x00000001) != 0)) {
+          fields_ = fields_.getUnmodifiableView();
+        }
+        if (((mutable_bitField0_ & 0x00000002) != 0)) {
+          values_ = java.util.Collections.unmodifiableList(values_);
+        }
+        this.unknownFields = unknownFields.build();
+        makeExtensionsImmutable();
+      }
+    }
+    public static final com.google.protobuf.Descriptors.Descriptor
+        getDescriptor() {
+      return com.usthe.common.entity.message.CollectRep.internal_static_com_usthe_common_entity_message_MetricsData_descriptor;
+    }
+
+    @java.lang.Override
+    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+        internalGetFieldAccessorTable() {
+      return com.usthe.common.entity.message.CollectRep.internal_static_com_usthe_common_entity_message_MetricsData_fieldAccessorTable
+          .ensureFieldAccessorsInitialized(
+              com.usthe.common.entity.message.CollectRep.MetricsData.class, com.usthe.common.entity.message.CollectRep.MetricsData.Builder.class);
+    }
+
+    public static final int ID_FIELD_NUMBER = 1;
+    private long id_;
+    /**
+     * <pre>
+     * 监控的ID
+     * </pre>
+     *
+     * <code>uint64 id = 1;</code>
+     * @return The id.
+     */
+    @java.lang.Override
+    public long getId() {
+      return id_;
+    }
+
+    public static final int APP_FIELD_NUMBER = 2;
+    private volatile java.lang.Object app_;
+    /**
+     * <pre>
+     * 监控的类型 eg: linux | mysql | jvm
+     * </pre>
+     *
+     * <code>string app = 2;</code>
+     * @return The app.
+     */
+    @java.lang.Override
+    public java.lang.String getApp() {
+      java.lang.Object ref = app_;
+      if (ref instanceof java.lang.String) {
+        return (java.lang.String) ref;
+      } else {
+        com.google.protobuf.ByteString bs = 
+            (com.google.protobuf.ByteString) ref;
+        java.lang.String s = bs.toStringUtf8();
+        app_ = s;
+        return s;
+      }
+    }
+    /**
+     * <pre>
+     * 监控的类型 eg: linux | mysql | jvm
+     * </pre>
+     *
+     * <code>string app = 2;</code>
+     * @return The bytes for app.
+     */
+    @java.lang.Override
+    public com.google.protobuf.ByteString
+        getAppBytes() {
+      java.lang.Object ref = app_;
+      if (ref instanceof java.lang.String) {
+        com.google.protobuf.ByteString b = 
+            com.google.protobuf.ByteString.copyFromUtf8(
+                (java.lang.String) ref);
+        app_ = b;
+        return b;
+      } else {
+        return (com.google.protobuf.ByteString) ref;
+      }
+    }
+
+    public static final int METRICS_FIELD_NUMBER = 3;
+    private volatile java.lang.Object metrics_;
+    /**
+     * <pre>
+     * 监控采集的指标集合 eg: cpu | memory | health
+     * </pre>
+     *
+     * <code>string metrics = 3;</code>
+     * @return The metrics.
+     */
+    @java.lang.Override
+    public java.lang.String getMetrics() {
+      java.lang.Object ref = metrics_;
+      if (ref instanceof java.lang.String) {
+        return (java.lang.String) ref;
+      } else {
+        com.google.protobuf.ByteString bs = 
+            (com.google.protobuf.ByteString) ref;
+        java.lang.String s = bs.toStringUtf8();
+        metrics_ = s;
+        return s;
+      }
+    }
+    /**
+     * <pre>
+     * 监控采集的指标集合 eg: cpu | memory | health
+     * </pre>
+     *
+     * <code>string metrics = 3;</code>
+     * @return The bytes for metrics.
+     */
+    @java.lang.Override
+    public com.google.protobuf.ByteString
+        getMetricsBytes() {
+      java.lang.Object ref = metrics_;
+      if (ref instanceof java.lang.String) {
+        com.google.protobuf.ByteString b = 
+            com.google.protobuf.ByteString.copyFromUtf8(
+                (java.lang.String) ref);
+        metrics_ = b;
+        return b;
+      } else {
+        return (com.google.protobuf.ByteString) ref;
+      }
+    }
+
+    public static final int TIME_FIELD_NUMBER = 4;
+    private long time_;
+    /**
+     * <pre>
+     * 采集时间
+     * </pre>
+     *
+     * <code>uint64 time = 4;</code>
+     * @return The time.
+     */
+    @java.lang.Override
+    public long getTime() {
+      return time_;
+    }
+
+    public static final int CODE_FIELD_NUMBER = 5;
+    private int code_;
+    /**
+     * <pre>
+     * 采集响应码
+     * </pre>
+     *
+     * <code>.com.usthe.common.entity.message.Code code = 5;</code>
+     * @return The enum numeric value on the wire for code.
+     */
+    @java.lang.Override public int getCodeValue() {
+      return code_;
+    }
+    /**
+     * <pre>
+     * 采集响应码
+     * </pre>
+     *
+     * <code>.com.usthe.common.entity.message.Code code = 5;</code>
+     * @return The code.
+     */
+    @java.lang.Override public com.usthe.common.entity.message.CollectRep.Code getCode() {
+      @SuppressWarnings("deprecation")
+      com.usthe.common.entity.message.CollectRep.Code result = com.usthe.common.entity.message.CollectRep.Code.valueOf(code_);
+      return result == null ? com.usthe.common.entity.message.CollectRep.Code.UNRECOGNIZED : result;
+    }
+
+    public static final int MSG_FIELD_NUMBER = 6;
+    private volatile java.lang.Object msg_;
+    /**
+     * <pre>
+     * 采集响应信息
+     * </pre>
+     *
+     * <code>string msg = 6;</code>
+     * @return The msg.
+     */
+    @java.lang.Override
+    public java.lang.String getMsg() {
+      java.lang.Object ref = msg_;
+      if (ref instanceof java.lang.String) {
+        return (java.lang.String) ref;
+      } else {
+        com.google.protobuf.ByteString bs = 
+            (com.google.protobuf.ByteString) ref;
+        java.lang.String s = bs.toStringUtf8();
+        msg_ = s;
+        return s;
+      }
+    }
+    /**
+     * <pre>
+     * 采集响应信息
+     * </pre>
+     *
+     * <code>string msg = 6;</code>
+     * @return The bytes for msg.
+     */
+    @java.lang.Override
+    public com.google.protobuf.ByteString
+        getMsgBytes() {
+      java.lang.Object ref = msg_;
+      if (ref instanceof java.lang.String) {
+        com.google.protobuf.ByteString b = 
+            com.google.protobuf.ByteString.copyFromUtf8(
+                (java.lang.String) ref);
+        msg_ = b;
+        return b;
+      } else {
+        return (com.google.protobuf.ByteString) ref;
+      }
+    }
+
+    public static final int FIELDS_FIELD_NUMBER = 7;
+    private com.google.protobuf.LazyStringList fields_;
+    /**
+     * <pre>
+     * 采集指标名
+     * </pre>
+     *
+     * <code>repeated string fields = 7;</code>
+     * @return A list containing the fields.
+     */
+    public com.google.protobuf.ProtocolStringList
+        getFieldsList() {
+      return fields_;
+    }
+    /**
+     * <pre>
+     * 采集指标名
+     * </pre>
+     *
+     * <code>repeated string fields = 7;</code>
+     * @return The count of fields.
+     */
+    public int getFieldsCount() {
+      return fields_.size();
+    }
+    /**
+     * <pre>
+     * 采集指标名
+     * </pre>
+     *
+     * <code>repeated string fields = 7;</code>
+     * @param index The index of the element to return.
+     * @return The fields at the given index.
+     */
+    public java.lang.String getFields(int index) {
+      return fields_.get(index);
+    }
+    /**
+     * <pre>
+     * 采集指标名
+     * </pre>
+     *
+     * <code>repeated string fields = 7;</code>
+     * @param index The index of the value to return.
+     * @return The bytes of the fields at the given index.
+     */
+    public com.google.protobuf.ByteString
+        getFieldsBytes(int index) {
+      return fields_.getByteString(index);
+    }
+
+    public static final int VALUES_FIELD_NUMBER = 8;
+    private java.util.List<com.usthe.common.entity.message.CollectRep.ValueRow> values_;
+    /**
+     * <pre>
+     * 采集指标值集合(fields作为字段名称与ValueRow映射)
+     * </pre>
+     *
+     * <code>repeated .com.usthe.common.entity.message.ValueRow values = 8;</code>
+     */
+    @java.lang.Override
+    public java.util.List<com.usthe.common.entity.message.CollectRep.ValueRow> getValuesList() {
+      return values_;
+    }
+    /**
+     * <pre>
+     * 采集指标值集合(fields作为字段名称与ValueRow映射)
+     * </pre>
+     *
+     * <code>repeated .com.usthe.common.entity.message.ValueRow values = 8;</code>
+     */
+    @java.lang.Override
+    public java.util.List<? extends com.usthe.common.entity.message.CollectRep.ValueRowOrBuilder> 
+        getValuesOrBuilderList() {
+      return values_;
+    }
+    /**
+     * <pre>
+     * 采集指标值集合(fields作为字段名称与ValueRow映射)
+     * </pre>
+     *
+     * <code>repeated .com.usthe.common.entity.message.ValueRow values = 8;</code>
+     */
+    @java.lang.Override
+    public int getValuesCount() {
+      return values_.size();
+    }
+    /**
+     * <pre>
+     * 采集指标值集合(fields作为字段名称与ValueRow映射)
+     * </pre>
+     *
+     * <code>repeated .com.usthe.common.entity.message.ValueRow values = 8;</code>
+     */
+    @java.lang.Override
+    public com.usthe.common.entity.message.CollectRep.ValueRow getValues(int index) {
+      return values_.get(index);
+    }
+    /**
+     * <pre>
+     * 采集指标值集合(fields作为字段名称与ValueRow映射)
+     * </pre>
+     *
+     * <code>repeated .com.usthe.common.entity.message.ValueRow values = 8;</code>
+     */
+    @java.lang.Override
+    public com.usthe.common.entity.message.CollectRep.ValueRowOrBuilder getValuesOrBuilder(
+        int index) {
+      return values_.get(index);
+    }
+
+    private byte memoizedIsInitialized = -1;
+    @java.lang.Override
+    public final boolean isInitialized() {
+      byte isInitialized = memoizedIsInitialized;
+      if (isInitialized == 1) return true;
+      if (isInitialized == 0) return false;
+
+      memoizedIsInitialized = 1;
+      return true;
+    }
+
+    @java.lang.Override
+    public void writeTo(com.google.protobuf.CodedOutputStream output)
+                        throws java.io.IOException {
+      if (id_ != 0L) {
+        output.writeUInt64(1, id_);
+      }
+      if (!getAppBytes().isEmpty()) {
+        com.google.protobuf.GeneratedMessageV3.writeString(output, 2, app_);
+      }
+      if (!getMetricsBytes().isEmpty()) {
+        com.google.protobuf.GeneratedMessageV3.writeString(output, 3, metrics_);
+      }
+      if (time_ != 0L) {
+        output.writeUInt64(4, time_);
+      }
+      if (code_ != com.usthe.common.entity.message.CollectRep.Code.SUCCESS.getNumber()) {
+        output.writeEnum(5, code_);
+      }
+      if (!getMsgBytes().isEmpty()) {
+        com.google.protobuf.GeneratedMessageV3.writeString(output, 6, msg_);
+      }
+      for (int i = 0; i < fields_.size(); i++) {
+        com.google.protobuf.GeneratedMessageV3.writeString(output, 7, fields_.getRaw(i));
+      }
+      for (int i = 0; i < values_.size(); i++) {
+        output.writeMessage(8, values_.get(i));
+      }
+      unknownFields.writeTo(output);
+    }
+
+    @java.lang.Override
+    public int getSerializedSize() {
+      int size = memoizedSize;
+      if (size != -1) return size;
+
+      size = 0;
+      if (id_ != 0L) {
+        size += com.google.protobuf.CodedOutputStream
+          .computeUInt64Size(1, id_);
+      }
+      if (!getAppBytes().isEmpty()) {
+        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, app_);
+      }
+      if (!getMetricsBytes().isEmpty()) {
+        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, metrics_);
+      }
+      if (time_ != 0L) {
+        size += com.google.protobuf.CodedOutputStream
+          .computeUInt64Size(4, time_);
+      }
+      if (code_ != com.usthe.common.entity.message.CollectRep.Code.SUCCESS.getNumber()) {
+        size += com.google.protobuf.CodedOutputStream
+          .computeEnumSize(5, code_);
+      }
+      if (!getMsgBytes().isEmpty()) {
+        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, msg_);
+      }
+      {
+        int dataSize = 0;
+        for (int i = 0; i < fields_.size(); i++) {
+          dataSize += computeStringSizeNoTag(fields_.getRaw(i));
+        }
+        size += dataSize;
+        size += 1 * getFieldsList().size();
+      }
+      for (int i = 0; i < values_.size(); i++) {
+        size += com.google.protobuf.CodedOutputStream
+          .computeMessageSize(8, values_.get(i));
+      }
+      size += unknownFields.getSerializedSize();
+      memoizedSize = size;
+      return size;
+    }
+
+    @java.lang.Override
+    public boolean equals(final java.lang.Object obj) {
+      if (obj == this) {
+       return true;
+      }
+      if (!(obj instanceof com.usthe.common.entity.message.CollectRep.MetricsData)) {
+        return super.equals(obj);
+      }
+      com.usthe.common.entity.message.CollectRep.MetricsData other = (com.usthe.common.entity.message.CollectRep.MetricsData) obj;
+
+      if (getId()
+          != other.getId()) return false;
+      if (!getApp()
+          .equals(other.getApp())) return false;
+      if (!getMetrics()
+          .equals(other.getMetrics())) return false;
+      if (getTime()
+          != other.getTime()) return false;
+      if (code_ != other.code_) return false;
+      if (!getMsg()
+          .equals(other.getMsg())) return false;
+      if (!getFieldsList()
+          .equals(other.getFieldsList())) return false;
+      if (!getValuesList()
+          .equals(other.getValuesList())) return false;
+      if (!unknownFields.equals(other.unknownFields)) return false;
+      return true;
+    }
+
+    @java.lang.Override
+    public int hashCode() {
+      if (memoizedHashCode != 0) {
+        return memoizedHashCode;
+      }
+      int hash = 41;
+      hash = (19 * hash) + getDescriptor().hashCode();
+      hash = (37 * hash) + ID_FIELD_NUMBER;
+      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
+          getId());
+      hash = (37 * hash) + APP_FIELD_NUMBER;
+      hash = (53 * hash) + getApp().hashCode();
+      hash = (37 * hash) + METRICS_FIELD_NUMBER;
+      hash = (53 * hash) + getMetrics().hashCode();
+      hash = (37 * hash) + TIME_FIELD_NUMBER;
+      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
+          getTime());
+      hash = (37 * hash) + CODE_FIELD_NUMBER;
+      hash = (53 * hash) + code_;
+      hash = (37 * hash) + MSG_FIELD_NUMBER;
+      hash = (53 * hash) + getMsg().hashCode();
+      if (getFieldsCount() > 0) {
+        hash = (37 * hash) + FIELDS_FIELD_NUMBER;
+        hash = (53 * hash) + getFieldsList().hashCode();
+      }
+      if (getValuesCount() > 0) {
+        hash = (37 * hash) + VALUES_FIELD_NUMBER;
+        hash = (53 * hash) + getValuesList().hashCode();
+      }
+      hash = (29 * hash) + unknownFields.hashCode();
+      memoizedHashCode = hash;
+      return hash;
+    }
+
+    public static com.usthe.common.entity.message.CollectRep.MetricsData parseFrom(
+        java.nio.ByteBuffer data)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      return PARSER.parseFrom(data);
+    }
+    public static com.usthe.common.entity.message.CollectRep.MetricsData parseFrom(
+        java.nio.ByteBuffer data,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      return PARSER.parseFrom(data, extensionRegistry);
+    }
+    public static com.usthe.common.entity.message.CollectRep.MetricsData parseFrom(
+        com.google.protobuf.ByteString data)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      return PARSER.parseFrom(data);
+    }
+    public static com.usthe.common.entity.message.CollectRep.MetricsData parseFrom(
+        com.google.protobuf.ByteString data,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      return PARSER.parseFrom(data, extensionRegistry);
+    }
+    public static com.usthe.common.entity.message.CollectRep.MetricsData parseFrom(byte[] data)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      return PARSER.parseFrom(data);
+    }
+    public static com.usthe.common.entity.message.CollectRep.MetricsData parseFrom(
+        byte[] data,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      return PARSER.parseFrom(data, extensionRegistry);
+    }
+    public static com.usthe.common.entity.message.CollectRep.MetricsData parseFrom(java.io.InputStream input)
+        throws java.io.IOException {
+      return com.google.protobuf.GeneratedMessageV3
+          .parseWithIOException(PARSER, input);
+    }
+    public static com.usthe.common.entity.message.CollectRep.MetricsData parseFrom(
+        java.io.InputStream input,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws java.io.IOException {
+      return com.google.protobuf.GeneratedMessageV3
+          .parseWithIOException(PARSER, input, extensionRegistry);
+    }
+    public static com.usthe.common.entity.message.CollectRep.MetricsData parseDelimitedFrom(java.io.InputStream input)
+        throws java.io.IOException {
+      return com.google.protobuf.GeneratedMessageV3
+          .parseDelimitedWithIOException(PARSER, input);
+    }
+    public static com.usthe.common.entity.message.CollectRep.MetricsData parseDelimitedFrom(
+        java.io.InputStream input,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws java.io.IOException {
+      return com.google.protobuf.GeneratedMessageV3
+          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
+    }
+    public static com.usthe.common.entity.message.CollectRep.MetricsData parseFrom(
+        com.google.protobuf.CodedInputStream input)
+        throws java.io.IOException {
+      return com.google.protobuf.GeneratedMessageV3
+          .parseWithIOException(PARSER, input);
+    }
+    public static com.usthe.common.entity.message.CollectRep.MetricsData parseFrom(
+        com.google.protobuf.CodedInputStream input,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws java.io.IOException {
+      return com.google.protobuf.GeneratedMessageV3
+          .parseWithIOException(PARSER, input, extensionRegistry);
+    }
+
+    @java.lang.Override
+    public Builder newBuilderForType() { return newBuilder(); }
+    public static Builder newBuilder() {
+      return DEFAULT_INSTANCE.toBuilder();
+    }
+    public static Builder newBuilder(com.usthe.common.entity.message.CollectRep.MetricsData prototype) {
+      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+    }
+    @java.lang.Override
+    public Builder toBuilder() {
+      return this == DEFAULT_INSTANCE
+          ? new Builder() : new Builder().mergeFrom(this);
+    }
+
+    @java.lang.Override
+    protected Builder newBuilderForType(
+        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+      Builder builder = new Builder(parent);
+      return builder;
+    }
+    /**
+     * Protobuf type {@code com.usthe.common.entity.message.MetricsData}
+     */
+    public static final class Builder extends
+        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
+        // @@protoc_insertion_point(builder_implements:com.usthe.common.entity.message.MetricsData)
+        com.usthe.common.entity.message.CollectRep.MetricsDataOrBuilder {
+      public static final com.google.protobuf.Descriptors.Descriptor
+          getDescriptor() {
+        return com.usthe.common.entity.message.CollectRep.internal_static_com_usthe_common_entity_message_MetricsData_descriptor;
+      }
+
+      @java.lang.Override
+      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+          internalGetFieldAccessorTable() {
+        return com.usthe.common.entity.message.CollectRep.internal_static_com_usthe_common_entity_message_MetricsData_fieldAccessorTable
+            .ensureFieldAccessorsInitialized(
+                com.usthe.common.entity.message.CollectRep.MetricsData.class, com.usthe.common.entity.message.CollectRep.MetricsData.Builder.class);
+      }
+
+      // Construct using com.usthe.common.entity.message.CollectRep.MetricsData.newBuilder()
+      private Builder() {
+        maybeForceBuilderInitialization();
+      }
+
+      private Builder(
+          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+        super(parent);
+        maybeForceBuilderInitialization();
+      }
+      private void maybeForceBuilderInitialization() {
+        if (com.google.protobuf.GeneratedMessageV3
+                .alwaysUseFieldBuilders) {
+          getValuesFieldBuilder();
+        }
+      }
+      @java.lang.Override
+      public Builder clear() {
+        super.clear();
+        id_ = 0L;
+
+        app_ = "";
+
+        metrics_ = "";
+
+        time_ = 0L;
+
+        code_ = 0;
+
+        msg_ = "";
+
+        fields_ = com.google.protobuf.LazyStringArrayList.EMPTY;
+        bitField0_ = (bitField0_ & ~0x00000001);
+        if (valuesBuilder_ == null) {
+          values_ = java.util.Collections.emptyList();
+          bitField0_ = (bitField0_ & ~0x00000002);
+        } else {
+          valuesBuilder_.clear();
+        }
+        return this;
+      }
+
+      @java.lang.Override
+      public com.google.protobuf.Descriptors.Descriptor
+          getDescriptorForType() {
+        return com.usthe.common.entity.message.CollectRep.internal_static_com_usthe_common_entity_message_MetricsData_descriptor;
+      }
+
+      @java.lang.Override
+      public com.usthe.common.entity.message.CollectRep.MetricsData getDefaultInstanceForType() {
+        return com.usthe.common.entity.message.CollectRep.MetricsData.getDefaultInstance();
+      }
+
+      @java.lang.Override
+      public com.usthe.common.entity.message.CollectRep.MetricsData build() {
+        com.usthe.common.entity.message.CollectRep.MetricsData result = buildPartial();
+        if (!result.isInitialized()) {
+          throw newUninitializedMessageException(result);
+        }
+        return result;
+      }
+
+      @java.lang.Override
+      public com.usthe.common.entity.message.CollectRep.MetricsData buildPartial() {
+        com.usthe.common.entity.message.CollectRep.MetricsData result = new com.usthe.common.entity.message.CollectRep.MetricsData(this);
+        int from_bitField0_ = bitField0_;
+        result.id_ = id_;
+        result.app_ = app_;
+        result.metrics_ = metrics_;
+        result.time_ = time_;
+        result.code_ = code_;
+        result.msg_ = msg_;
+        if (((bitField0_ & 0x00000001) != 0)) {
+          fields_ = fields_.getUnmodifiableView();
+          bitField0_ = (bitField0_ & ~0x00000001);
+        }
+        result.fields_ = fields_;
+        if (valuesBuilder_ == null) {
+          if (((bitField0_ & 0x00000002) != 0)) {
+            values_ = java.util.Collections.unmodifiableList(values_);
+            bitField0_ = (bitField0_ & ~0x00000002);
+          }
+          result.values_ = values_;
+        } else {
+          result.values_ = valuesBuilder_.build();
+        }
+        onBuilt();
+        return result;
+      }
+
+      @java.lang.Override
+      public Builder clone() {
+        return super.clone();
+      }
+      @java.lang.Override
+      public Builder setField(
+          com.google.protobuf.Descriptors.FieldDescriptor field,
+          java.lang.Object value) {
+        return super.setField(field, value);
+      }
+      @java.lang.Override
+      public Builder clearField(
+          com.google.protobuf.Descriptors.FieldDescriptor field) {
+        return super.clearField(field);
+      }
+      @java.lang.Override
+      public Builder clearOneof(
+          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+        return super.clearOneof(oneof);
+      }
+      @java.lang.Override
+      public Builder setRepeatedField(
+          com.google.protobuf.Descriptors.FieldDescriptor field,
+          int index, java.lang.Object value) {
+        return super.setRepeatedField(field, index, value);
+      }
+      @java.lang.Override
+      public Builder addRepeatedField(
+          com.google.protobuf.Descriptors.FieldDescriptor field,
+          java.lang.Object value) {
+        return super.addRepeatedField(field, value);
+      }
+      @java.lang.Override
+      public Builder mergeFrom(com.google.protobuf.Message other) {
+        if (other instanceof com.usthe.common.entity.message.CollectRep.MetricsData) {
+          return mergeFrom((com.usthe.common.entity.message.CollectRep.MetricsData)other);
+        } else {
+          super.mergeFrom(other);
+          return this;
+        }
+      }
+
+      public Builder mergeFrom(com.usthe.common.entity.message.CollectRep.MetricsData other) {
+        if (other == com.usthe.common.entity.message.CollectRep.MetricsData.getDefaultInstance()) return this;
+        if (other.getId() != 0L) {
+          setId(other.getId());
+        }
+        if (!other.getApp().isEmpty()) {
+          app_ = other.app_;
+          onChanged();
+        }
+        if (!other.getMetrics().isEmpty()) {
+          metrics_ = other.metrics_;
+          onChanged();
+        }
+        if (other.getTime() != 0L) {
+          setTime(other.getTime());
+        }
+        if (other.code_ != 0) {
+          setCodeValue(other.getCodeValue());
+        }
+        if (!other.getMsg().isEmpty()) {
+          msg_ = other.msg_;
+          onChanged();
+        }
+        if (!other.fields_.isEmpty()) {
+          if (fields_.isEmpty()) {
+            fields_ = other.fields_;
+            bitField0_ = (bitField0_ & ~0x00000001);
+          } else {
+            ensureFieldsIsMutable();
+            fields_.addAll(other.fields_);
+          }
+          onChanged();
+        }
+        if (valuesBuilder_ == null) {
+          if (!other.values_.isEmpty()) {
+            if (values_.isEmpty()) {
+              values_ = other.values_;
+              bitField0_ = (bitField0_ & ~0x00000002);
+            } else {
+              ensureValuesIsMutable();
+              values_.addAll(other.values_);
+            }
+            onChanged();
+          }
+        } else {
+          if (!other.values_.isEmpty()) {
+            if (valuesBuilder_.isEmpty()) {
+              valuesBuilder_.dispose();
+              valuesBuilder_ = null;
+              values_ = other.values_;
+              bitField0_ = (bitField0_ & ~0x00000002);
+              valuesBuilder_ = 
+                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
+                   getValuesFieldBuilder() : null;
+            } else {
+              valuesBuilder_.addAllMessages(other.values_);
+            }
+          }
+        }
+        this.mergeUnknownFields(other.unknownFields);
+        onChanged();
+        return this;
+      }
+
+      @java.lang.Override
+      public final boolean isInitialized() {
+        return true;
+      }
+
+      @java.lang.Override
+      public Builder mergeFrom(
+          com.google.protobuf.CodedInputStream input,
+          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+          throws java.io.IOException {
+        com.usthe.common.entity.message.CollectRep.MetricsData parsedMessage = null;
+        try {
+          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+          parsedMessage = (com.usthe.common.entity.message.CollectRep.MetricsData) e.getUnfinishedMessage();
+          throw e.unwrapIOException();
+        } finally {
+          if (parsedMessage != null) {
+            mergeFrom(parsedMessage);
+          }
+        }
+        return this;
+      }
+      private int bitField0_;
+
+      private long id_ ;
+      /**
+       * <pre>
+       * 监控的ID
+       * </pre>
+       *
+       * <code>uint64 id = 1;</code>
+       * @return The id.
+       */
+      @java.lang.Override
+      public long getId() {
+        return id_;
+      }
+      /**
+       * <pre>
+       * 监控的ID
+       * </pre>
+       *
+       * <code>uint64 id = 1;</code>
+       * @param value The id to set.
+       * @return This builder for chaining.
+       */
+      public Builder setId(long value) {
+        
+        id_ = value;
+        onChanged();
+        return this;
+      }
+      /**
+       * <pre>
+       * 监控的ID
+       * </pre>
+       *
+       * <code>uint64 id = 1;</code>
+       * @return This builder for chaining.
+       */
+      public Builder clearId() {
+        
+        id_ = 0L;
+        onChanged();
+        return this;
+      }
+
+      private java.lang.Object app_ = "";
+      /**
+       * <pre>
+       * 监控的类型 eg: linux | mysql | jvm
+       * </pre>
+       *
+       * <code>string app = 2;</code>
+       * @return The app.
+       */
+      public java.lang.String getApp() {
+        java.lang.Object ref = app_;
+        if (!(ref instanceof java.lang.String)) {
+          com.google.protobuf.ByteString bs =
+              (com.google.protobuf.ByteString) ref;
+          java.lang.String s = bs.toStringUtf8();
+          app_ = s;
+          return s;
+        } else {
+          return (java.lang.String) ref;
+        }
+      }
+      /**
+       * <pre>
+       * 监控的类型 eg: linux | mysql | jvm
+       * </pre>
+       *
+       * <code>string app = 2;</code>
+       * @return The bytes for app.
+       */
+      public com.google.protobuf.ByteString
+          getAppBytes() {
+        java.lang.Object ref = app_;
+        if (ref instanceof String) {
+          com.google.protobuf.ByteString b = 
+              com.google.protobuf.ByteString.copyFromUtf8(
+                  (java.lang.String) ref);
+          app_ = b;
+          return b;
+        } else {
+          return (com.google.protobuf.ByteString) ref;
+        }
+      }
+      /**
+       * <pre>
+       * 监控的类型 eg: linux | mysql | jvm
+       * </pre>
+       *
+       * <code>string app = 2;</code>
+       * @param value The app to set.
+       * @return This builder for chaining.
+       */
+      public Builder setApp(
+          java.lang.String value) {
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  
+        app_ = value;
+        onChanged();
+        return this;
+      }
+      /**
+       * <pre>
+       * 监控的类型 eg: linux | mysql | jvm
+       * </pre>
+       *
+       * <code>string app = 2;</code>
+       * @return This builder for chaining.
+       */
+      public Builder clearApp() {
+        
+        app_ = getDefaultInstance().getApp();
+        onChanged();
+        return this;
+      }
+      /**
+       * <pre>
+       * 监控的类型 eg: linux | mysql | jvm
+       * </pre>
+       *
+       * <code>string app = 2;</code>
+       * @param value The bytes for app to set.
+       * @return This builder for chaining.
+       */
+      public Builder setAppBytes(
+          com.google.protobuf.ByteString value) {
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  checkByteStringIsUtf8(value);
+        
+        app_ = value;
+        onChanged();
+        return this;
+      }
+
+      private java.lang.Object metrics_ = "";
+      /**
+       * <pre>
+       * 监控采集的指标集合 eg: cpu | memory | health
+       * </pre>
+       *
+       * <code>string metrics = 3;</code>
+       * @return The metrics.
+       */
+      public java.lang.String getMetrics() {
+        java.lang.Object ref = metrics_;
+        if (!(ref instanceof java.lang.String)) {
+          com.google.protobuf.ByteString bs =
+              (com.google.protobuf.ByteString) ref;
+          java.lang.String s = bs.toStringUtf8();
+          metrics_ = s;
+          return s;
+        } else {
+          return (java.lang.String) ref;
+        }
+      }
+      /**
+       * <pre>
+       * 监控采集的指标集合 eg: cpu | memory | health
+       * </pre>
+       *
+       * <code>string metrics = 3;</code>
+       * @return The bytes for metrics.
+       */
+      public com.google.protobuf.ByteString
+          getMetricsBytes() {
+        java.lang.Object ref = metrics_;
+        if (ref instanceof String) {
+          com.google.protobuf.ByteString b = 
+              com.google.protobuf.ByteString.copyFromUtf8(
+                  (java.lang.String) ref);
+          metrics_ = b;
+          return b;
+        } else {
+          return (com.google.protobuf.ByteString) ref;
+        }
+      }
+      /**
+       * <pre>
+       * 监控采集的指标集合 eg: cpu | memory | health
+       * </pre>
+       *
+       * <code>string metrics = 3;</code>
+       * @param value The metrics to set.
+       * @return This builder for chaining.
+       */
+      public Builder setMetrics(
+          java.lang.String value) {
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  
+        metrics_ = value;
+        onChanged();
+        return this;
+      }
+      /**
+       * <pre>
+       * 监控采集的指标集合 eg: cpu | memory | health
+       * </pre>
+       *
+       * <code>string metrics = 3;</code>
+       * @return This builder for chaining.
+       */
+      public Builder clearMetrics() {
+        
+        metrics_ = getDefaultInstance().getMetrics();
+        onChanged();
+        return this;
+      }
+      /**
+       * <pre>
+       * 监控采集的指标集合 eg: cpu | memory | health
+       * </pre>
+       *
+       * <code>string metrics = 3;</code>
+       * @param value The bytes for metrics to set.
+       * @return This builder for chaining.
+       */
+      public Builder setMetricsBytes(
+          com.google.protobuf.ByteString value) {
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  checkByteStringIsUtf8(value);
+        
+        metrics_ = value;
+        onChanged();
+        return this;
+      }
+
+      private long time_ ;
+      /**
+       * <pre>
+       * 采集时间
+       * </pre>
+       *
+       * <code>uint64 time = 4;</code>
+       * @return The time.
+       */
+      @java.lang.Override
+      public long getTime() {
+        return time_;
+      }
+      /**
+       * <pre>
+       * 采集时间
+       * </pre>
+       *
+       * <code>uint64 time = 4;</code>
+       * @param value The time to set.
+       * @return This builder for chaining.
+       */
+      public Builder setTime(long value) {
+        
+        time_ = value;
+        onChanged();
+        return this;
+      }
+      /**
+       * <pre>
+       * 采集时间
+       * </pre>
+       *
+       * <code>uint64 time = 4;</code>
+       * @return This builder for chaining.
+       */
+      public Builder clearTime() {
+        
+        time_ = 0L;
+        onChanged();
+        return this;
+      }
+
+      private int code_ = 0;
+      /**
+       * <pre>
+       * 采集响应码
+       * </pre>
+       *
+       * <code>.com.usthe.common.entity.message.Code code = 5;</code>
+       * @return The enum numeric value on the wire for code.
+       */
+      @java.lang.Override public int getCodeValue() {
+        return code_;
+      }
+      /**
+       * <pre>
+       * 采集响应码
+       * </pre>
+       *
+       * <code>.com.usthe.common.entity.message.Code code = 5;</code>
+       * @param value The enum numeric value on the wire for code to set.
+       * @return This builder for chaining.
+       */
+      public Builder setCodeValue(int value) {
+        
+        code_ = value;
+        onChanged();
+        return this;
+      }
+      /**
+       * <pre>
+       * 采集响应码
+       * </pre>
+       *
+       * <code>.com.usthe.common.entity.message.Code code = 5;</code>
+       * @return The code.
+       */
+      @java.lang.Override
+      public com.usthe.common.entity.message.CollectRep.Code getCode() {
+        @SuppressWarnings("deprecation")
+        com.usthe.common.entity.message.CollectRep.Code result = com.usthe.common.entity.message.CollectRep.Code.valueOf(code_);
+        return result == null ? com.usthe.common.entity.message.CollectRep.Code.UNRECOGNIZED : result;
+      }
+      /**
+       * <pre>
+       * 采集响应码
+       * </pre>
+       *
+       * <code>.com.usthe.common.entity.message.Code code = 5;</code>
+       * @param value The code to set.
+       * @return This builder for chaining.
+       */
+      public Builder setCode(com.usthe.common.entity.message.CollectRep.Code value) {
+        if (value == null) {
+          throw new NullPointerException();
+        }
+        
+        code_ = value.getNumber();
+        onChanged();
+        return this;
+      }
+      /**
+       * <pre>
+       * 采集响应码
+       * </pre>
+       *
+       * <code>.com.usthe.common.entity.message.Code code = 5;</code>
+       * @return This builder for chaining.
+       */
+      public Builder clearCode() {
+        
+        code_ = 0;
+        onChanged();
+        return this;
+      }
+
+      private java.lang.Object msg_ = "";
+      /**
+       * <pre>
+       * 采集响应信息
+       * </pre>
+       *
+       * <code>string msg = 6;</code>
+       * @return The msg.
+       */
+      public java.lang.String getMsg() {
+        java.lang.Object ref = msg_;
+        if (!(ref instanceof java.lang.String)) {
+          com.google.protobuf.ByteString bs =
+              (com.google.protobuf.ByteString) ref;
+          java.lang.String s = bs.toStringUtf8();
+          msg_ = s;
+          return s;
+        } else {
+          return (java.lang.String) ref;
+        }
+      }
+      /**
+       * <pre>
+       * 采集响应信息
+       * </pre>
+       *
+       * <code>string msg = 6;</code>
+       * @return The bytes for msg.
+       */
+      public com.google.protobuf.ByteString
+          getMsgBytes() {
+        java.lang.Object ref = msg_;
+        if (ref instanceof String) {
+          com.google.protobuf.ByteString b = 
+              com.google.protobuf.ByteString.copyFromUtf8(
+                  (java.lang.String) ref);
+          msg_ = b;
+          return b;
+        } else {
+          return (com.google.protobuf.ByteString) ref;
+        }
+      }
+      /**
+       * <pre>
+       * 采集响应信息
+       * </pre>
+       *
+       * <code>string msg = 6;</code>
+       * @param value The msg to set.
+       * @return This builder for chaining.
+       */
+      public Builder setMsg(
+          java.lang.String value) {
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  
+        msg_ = value;
+        onChanged();
+        return this;
+      }
+      /**
+       * <pre>
+       * 采集响应信息
+       * </pre>
+       *
+       * <code>string msg = 6;</code>
+       * @return This builder for chaining.
+       */
+      public Builder clearMsg() {
+        
+        msg_ = getDefaultInstance().getMsg();
+        onChanged();
+        return this;
+      }
+      /**
+       * <pre>
+       * 采集响应信息
+       * </pre>
+       *
+       * <code>string msg = 6;</code>
+       * @param value The bytes for msg to set.
+       * @return This builder for chaining.
+       */
+      public Builder setMsgBytes(
+          com.google.protobuf.ByteString value) {
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  checkByteStringIsUtf8(value);
+        
+        msg_ = value;
+        onChanged();
+        return this;
+      }
+
+      private com.google.protobuf.LazyStringList fields_ = com.google.protobuf.LazyStringArrayList.EMPTY;
+      private void ensureFieldsIsMutable() {
+        if (!((bitField0_ & 0x00000001) != 0)) {
+          fields_ = new com.google.protobuf.LazyStringArrayList(fields_);
+          bitField0_ |= 0x00000001;
+         }
+      }
+      /**
+       * <pre>
+       * 采集指标名
+       * </pre>
+       *
+       * <code>repeated string fields = 7;</code>
+       * @return A list containing the fields.
+       */
+      public com.google.protobuf.ProtocolStringList
+          getFieldsList() {
+        return fields_.getUnmodifiableView();
+      }
+      /**
+       * <pre>
+       * 采集指标名
+       * </pre>
+       *
+       * <code>repeated string fields = 7;</code>
+       * @return The count of fields.
+       */
+      public int getFieldsCount() {
+        return fields_.size();
+      }
+      /**
+       * <pre>
+       * 采集指标名
+       * </pre>
+       *
+       * <code>repeated string fields = 7;</code>
+       * @param index The index of the element to return.
+       * @return The fields at the given index.
+       */
+      public java.lang.String getFields(int index) {
+        return fields_.get(index);
+      }
+      /**
+       * <pre>
+       * 采集指标名
+       * </pre>
+       *
+       * <code>repeated string fields = 7;</code>
+       * @param index The index of the value to return.
+       * @return The bytes of the fields at the given index.
+       */
+      public com.google.protobuf.ByteString
+          getFieldsBytes(int index) {
+        return fields_.getByteString(index);
+      }
+      /**
+       * <pre>
+       * 采集指标名
+       * </pre>
+       *
+       * <code>repeated string fields = 7;</code>
+       * @param index The index to set the value at.
+       * @param value The fields to set.
+       * @return This builder for chaining.
+       */
+      public Builder setFields(
+          int index, java.lang.String value) {
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  ensureFieldsIsMutable();
+        fields_.set(index, value);
+        onChanged();
+        return this;
+      }
+      /**
+       * <pre>
+       * 采集指标名
+       * </pre>
+       *
+       * <code>repeated string fields = 7;</code>
+       * @param value The fields to add.
+       * @return This builder for chaining.
+       */
+      public Builder addFields(
+          java.lang.String value) {
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  ensureFieldsIsMutable();
+        fields_.add(value);
+        onChanged();
+        return this;
+      }
+      /**
+       * <pre>
+       * 采集指标名
+       * </pre>
+       *
+       * <code>repeated string fields = 7;</code>
+       * @param values The fields to add.
+       * @return This builder for chaining.
+       */
+      public Builder addAllFields(
+          java.lang.Iterable<java.lang.String> values) {
+        ensureFieldsIsMutable();
+        com.google.protobuf.AbstractMessageLite.Builder.addAll(
+            values, fields_);
+        onChanged();
+        return this;
+      }
+      /**
+       * <pre>
+       * 采集指标名
+       * </pre>
+       *
+       * <code>repeated string fields = 7;</code>
+       * @return This builder for chaining.
+       */
+      public Builder clearFields() {
+        fields_ = com.google.protobuf.LazyStringArrayList.EMPTY;
+        bitField0_ = (bitField0_ & ~0x00000001);
+        onChanged();
+        return this;
+      }
+      /**
+       * <pre>
+       * 采集指标名
+       * </pre>
+       *
+       * <code>repeated string fields = 7;</code>
+       * @param value The bytes of the fields to add.
+       * @return This builder for chaining.
+       */
+      public Builder addFieldsBytes(
+          com.google.protobuf.ByteString value) {
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  checkByteStringIsUtf8(value);
+        ensureFieldsIsMutable();
+        fields_.add(value);
+        onChanged();
+        return this;
+      }
+
+      private java.util.List<com.usthe.common.entity.message.CollectRep.ValueRow> values_ =
+        java.util.Collections.emptyList();
+      private void ensureValuesIsMutable() {
+        if (!((bitField0_ & 0x00000002) != 0)) {
+          values_ = new java.util.ArrayList<com.usthe.common.entity.message.CollectRep.ValueRow>(values_);
+          bitField0_ |= 0x00000002;
+         }
+      }
+
+      private com.google.protobuf.RepeatedFieldBuilderV3<
+          com.usthe.common.entity.message.CollectRep.ValueRow, com.usthe.common.entity.message.CollectRep.ValueRow.Builder, com.usthe.common.entity.message.CollectRep.ValueRowOrBuilder> valuesBuilder_;
+
+      /**
+       * <pre>
+       * 采集指标值集合(fields作为字段名称与ValueRow映射)
+       * </pre>
+       *
+       * <code>repeated .com.usthe.common.entity.message.ValueRow values = 8;</code>
+       */
+      public java.util.List<com.usthe.common.entity.message.CollectRep.ValueRow> getValuesList() {
+        if (valuesBuilder_ == null) {
+          return java.util.Collections.unmodifiableList(values_);
+        } else {
+          return valuesBuilder_.getMessageList();
+        }
+      }
+      /**
+       * <pre>
+       * 采集指标值集合(fields作为字段名称与ValueRow映射)
+       * </pre>
+       *
+       * <code>repeated .com.usthe.common.entity.message.ValueRow values = 8;</code>
+       */
+      public int getValuesCount() {
+        if (valuesBuilder_ == null) {
+          return values_.size();
+        } else {
+          return valuesBuilder_.getCount();
+        }
+      }
+      /**
+       * <pre>
+       * 采集指标值集合(fields作为字段名称与ValueRow映射)
+       * </pre>
+       *
+       * <code>repeated .com.usthe.common.entity.message.ValueRow values = 8;</code>
+       */
+      public com.usthe.common.entity.message.CollectRep.ValueRow getValues(int index) {
+        if (valuesBuilder_ == null) {
+          return values_.get(index);
+        } else {
+          return valuesBuilder_.getMessage(index);
+        }
+      }
+      /**
+       * <pre>
+       * 采集指标值集合(fields作为字段名称与ValueRow映射)
+       * </pre>
+       *
+       * <code>repeated .com.usthe.common.entity.message.ValueRow values = 8;</code>
+       */
+      public Builder setValues(
+          int index, com.usthe.common.entity.message.CollectRep.ValueRow value) {
+        if (valuesBuilder_ == null) {
+          if (value == null) {
+            throw new NullPointerException();
+          }
+          ensureValuesIsMutable();
+          values_.set(index, value);
+          onChanged();
+        } else {
+          valuesBuilder_.setMessage(index, value);
+        }
+        return this;
+      }
+      /**
+       * <pre>
+       * 采集指标值集合(fields作为字段名称与ValueRow映射)
+       * </pre>
+       *
+       * <code>repeated .com.usthe.common.entity.message.ValueRow values = 8;</code>
+       */
+      public Builder setValues(
+          int index, com.usthe.common.entity.message.CollectRep.ValueRow.Builder builderForValue) {
+        if (valuesBuilder_ == null) {
+          ensureValuesIsMutable();
+          values_.set(index, builderForValue.build());
+          onChanged();
+        } else {
+          valuesBuilder_.setMessage(index, builderForValue.build());
+        }
+        return this;
+      }
+      /**
+       * <pre>
+       * 采集指标值集合(fields作为字段名称与ValueRow映射)
+       * </pre>
+       *
+       * <code>repeated .com.usthe.common.entity.message.ValueRow values = 8;</code>
+       */
+      public Builder addValues(com.usthe.common.entity.message.CollectRep.ValueRow value) {
+        if (valuesBuilder_ == null) {
+          if (value == null) {
+            throw new NullPointerException();
+          }
+          ensureValuesIsMutable();
+          values_.add(value);
+          onChanged();
+        } else {
+          valuesBuilder_.addMessage(value);
+        }
+        return this;
+      }
+      /**
+       * <pre>
+       * 采集指标值集合(fields作为字段名称与ValueRow映射)
+       * </pre>
+       *
+       * <code>repeated .com.usthe.common.entity.message.ValueRow values = 8;</code>
+       */
+      public Builder addValues(
+          int index, com.usthe.common.entity.message.CollectRep.ValueRow value) {
+        if (valuesBuilder_ == null) {
+          if (value == null) {
+            throw new NullPointerException();
+          }
+          ensureValuesIsMutable();
+          values_.add(index, value);
+          onChanged();
+        } else {
+          valuesBuilder_.addMessage(index, value);
+        }
+        return this;
+      }
+      /**
+       * <pre>
+       * 采集指标值集合(fields作为字段名称与ValueRow映射)
+       * </pre>
+       *
+       * <code>repeated .com.usthe.common.entity.message.ValueRow values = 8;</code>
+       */
+      public Builder addValues(
+          com.usthe.common.entity.message.CollectRep.ValueRow.Builder builderForValue) {
+        if (valuesBuilder_ == null) {
+          ensureValuesIsMutable();
+          values_.add(builderForValue.build());
+          onChanged();
+        } else {
+          valuesBuilder_.addMessage(builderForValue.build());
+        }
+        return this;
+      }
+      /**
+       * <pre>
+       * 采集指标值集合(fields作为字段名称与ValueRow映射)
+       * </pre>
+       *
+       * <code>repeated .com.usthe.common.entity.message.ValueRow values = 8;</code>
+       */
+      public Builder addValues(
+          int index, com.usthe.common.entity.message.CollectRep.ValueRow.Builder builderForValue) {
+        if (valuesBuilder_ == null) {
+          ensureValuesIsMutable();
+          values_.add(index, builderForValue.build());
+          onChanged();
+        } else {
+          valuesBuilder_.addMessage(index, builderForValue.build());
+        }
+        return this;
+      }
+      /**
+       * <pre>
+       * 采集指标值集合(fields作为字段名称与ValueRow映射)
+       * </pre>
+       *
+       * <code>repeated .com.usthe.common.entity.message.ValueRow values = 8;</code>
+       */
+      public Builder addAllValues(
+          java.lang.Iterable<? extends com.usthe.common.entity.message.CollectRep.ValueRow> values) {
+        if (valuesBuilder_ == null) {
+          ensureValuesIsMutable();
+          com.google.protobuf.AbstractMessageLite.Builder.addAll(
+              values, values_);
+          onChanged();
+        } else {
+          valuesBuilder_.addAllMessages(values);
+        }
+        return this;
+      }
+      /**
+       * <pre>
+       * 采集指标值集合(fields作为字段名称与ValueRow映射)
+       * </pre>
+       *
+       * <code>repeated .com.usthe.common.entity.message.ValueRow values = 8;</code>
+       */
+      public Builder clearValues() {
+        if (valuesBuilder_ == null) {
+          values_ = java.util.Collections.emptyList();
+          bitField0_ = (bitField0_ & ~0x00000002);
+          onChanged();
+        } else {
+          valuesBuilder_.clear();
+        }
+        return this;
+      }
+      /**
+       * <pre>
+       * 采集指标值集合(fields作为字段名称与ValueRow映射)
+       * </pre>
+       *
+       * <code>repeated .com.usthe.common.entity.message.ValueRow values = 8;</code>
+       */
+      public Builder removeValues(int index) {
+        if (valuesBuilder_ == null) {
+          ensureValuesIsMutable();
+          values_.remove(index);
+          onChanged();
+        } else {
+          valuesBuilder_.remove(index);
+        }
+        return this;
+      }
+      /**
+       * <pre>
+       * 采集指标值集合(fields作为字段名称与ValueRow映射)
+       * </pre>
+       *
+       * <code>repeated .com.usthe.common.entity.message.ValueRow values = 8;</code>
+       */
+      public com.usthe.common.entity.message.CollectRep.ValueRow.Builder getValuesBuilder(
+          int index) {
+        return getValuesFieldBuilder().getBuilder(index);
+      }
+      /**
+       * <pre>
+       * 采集指标值集合(fields作为字段名称与ValueRow映射)
+       * </pre>
+       *
+       * <code>repeated .com.usthe.common.entity.message.ValueRow values = 8;</code>
+       */
+      public com.usthe.common.entity.message.CollectRep.ValueRowOrBuilder getValuesOrBuilder(
+          int index) {
+        if (valuesBuilder_ == null) {
+          return values_.get(index);  } else {
+          return valuesBuilder_.getMessageOrBuilder(index);
+        }
+      }
+      /**
+       * <pre>
+       * 采集指标值集合(fields作为字段名称与ValueRow映射)
+       * </pre>
+       *
+       * <code>repeated .com.usthe.common.entity.message.ValueRow values = 8;</code>
+       */
+      public java.util.List<? extends com.usthe.common.entity.message.CollectRep.ValueRowOrBuilder> 
+           getValuesOrBuilderList() {
+        if (valuesBuilder_ != null) {
+          return valuesBuilder_.getMessageOrBuilderList();
+        } else {
+          return java.util.Collections.unmodifiableList(values_);
+        }
+      }
+      /**
+       * <pre>
+       * 采集指标值集合(fields作为字段名称与ValueRow映射)
+       * </pre>
+       *
+       * <code>repeated .com.usthe.common.entity.message.ValueRow values = 8;</code>
+       */
+      public com.usthe.common.entity.message.CollectRep.ValueRow.Builder addValuesBuilder() {
+        return getValuesFieldBuilder().addBuilder(
+            com.usthe.common.entity.message.CollectRep.ValueRow.getDefaultInstance());
+      }
+      /**
+       * <pre>
+       * 采集指标值集合(fields作为字段名称与ValueRow映射)
+       * </pre>
+       *
+       * <code>repeated .com.usthe.common.entity.message.ValueRow values = 8;</code>
+       */
+      public com.usthe.common.entity.message.CollectRep.ValueRow.Builder addValuesBuilder(
+          int index) {
+        return getValuesFieldBuilder().addBuilder(
+            index, com.usthe.common.entity.message.CollectRep.ValueRow.getDefaultInstance());
+      }
+      /**
+       * <pre>
+       * 采集指标值集合(fields作为字段名称与ValueRow映射)
+       * </pre>
+       *
+       * <code>repeated .com.usthe.common.entity.message.ValueRow values = 8;</code>
+       */
+      public java.util.List<com.usthe.common.entity.message.CollectRep.ValueRow.Builder> 
+           getValuesBuilderList() {
+        return getValuesFieldBuilder().getBuilderList();
+      }
+      private com.google.protobuf.RepeatedFieldBuilderV3<
+          com.usthe.common.entity.message.CollectRep.ValueRow, com.usthe.common.entity.message.CollectRep.ValueRow.Builder, com.usthe.common.entity.message.CollectRep.ValueRowOrBuilder> 
+          getValuesFieldBuilder() {
+        if (valuesBuilder_ == null) {
+          valuesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
+              com.usthe.common.entity.message.CollectRep.ValueRow, com.usthe.common.entity.message.CollectRep.ValueRow.Builder, com.usthe.common.entity.message.CollectRep.ValueRowOrBuilder>(
+                  values_,
+                  ((bitField0_ & 0x00000002) != 0),
+                  getParentForChildren(),
+                  isClean());
+          values_ = null;
+        }
+        return valuesBuilder_;
+      }
+      @java.lang.Override
+      public final Builder setUnknownFields(
+          final com.google.protobuf.UnknownFieldSet unknownFields) {
+        return super.setUnknownFields(unknownFields);
+      }
+
+      @java.lang.Override
+      public final Builder mergeUnknownFields(
+          final com.google.protobuf.UnknownFieldSet unknownFields) {
+        return super.mergeUnknownFields(unknownFields);
+      }
+
+
+      // @@protoc_insertion_point(builder_scope:com.usthe.common.entity.message.MetricsData)
+    }
+
+    // @@protoc_insertion_point(class_scope:com.usthe.common.entity.message.MetricsData)
+    private static final com.usthe.common.entity.message.CollectRep.MetricsData DEFAULT_INSTANCE;
+    static {
+      DEFAULT_INSTANCE = new com.usthe.common.entity.message.CollectRep.MetricsData();
+    }
+
+    public static com.usthe.common.entity.message.CollectRep.MetricsData getDefaultInstance() {
+      return DEFAULT_INSTANCE;
+    }
+
+    private static final com.google.protobuf.Parser<MetricsData>
+        PARSER = new com.google.protobuf.AbstractParser<MetricsData>() {
+      @java.lang.Override
+      public MetricsData parsePartialFrom(
+          com.google.protobuf.CodedInputStream input,
+          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+          throws com.google.protobuf.InvalidProtocolBufferException {
+        return new MetricsData(input, extensionRegistry);
+      }
+    };
+
+    public static com.google.protobuf.Parser<MetricsData> parser() {
+      return PARSER;
+    }
+
+    @java.lang.Override
+    public com.google.protobuf.Parser<MetricsData> getParserForType() {
+      return PARSER;
+    }
+
+    @java.lang.Override
+    public com.usthe.common.entity.message.CollectRep.MetricsData getDefaultInstanceForType() {
+      return DEFAULT_INSTANCE;
+    }
+
+  }
+
+  public interface ValueRowOrBuilder extends
+      // @@protoc_insertion_point(interface_extends:com.usthe.common.entity.message.ValueRow)
+      com.google.protobuf.MessageOrBuilder {
+
+    /**
+     * <pre>
+     * 主键实例,唯一标识这行数据
+     * </pre>
+     *
+     * <code>string instance = 1;</code>
+     * @return The instance.
+     */
+    java.lang.String getInstance();
+    /**
+     * <pre>
+     * 主键实例,唯一标识这行数据
+     * </pre>
+     *
+     * <code>string instance = 1;</code>
+     * @return The bytes for instance.
+     */
+    com.google.protobuf.ByteString
+        getInstanceBytes();
+
+    /**
+     * <pre>
+     * 采集指标值
+     * </pre>
+     *
+     * <code>repeated string columns = 2;</code>
+     * @return A list containing the columns.
+     */
+    java.util.List<java.lang.String>
+        getColumnsList();
+    /**
+     * <pre>
+     * 采集指标值
+     * </pre>
+     *
+     * <code>repeated string columns = 2;</code>
+     * @return The count of columns.
+     */
+    int getColumnsCount();
+    /**
+     * <pre>
+     * 采集指标值
+     * </pre>
+     *
+     * <code>repeated string columns = 2;</code>
+     * @param index The index of the element to return.
+     * @return The columns at the given index.
+     */
+    java.lang.String getColumns(int index);
+    /**
+     * <pre>
+     * 采集指标值
+     * </pre>
+     *
+     * <code>repeated string columns = 2;</code>
+     * @param index The index of the value to return.
+     * @return The bytes of the columns at the given index.
+     */
+    com.google.protobuf.ByteString
+        getColumnsBytes(int index);
+  }
+  /**
+   * Protobuf type {@code com.usthe.common.entity.message.ValueRow}
+   */
+  public static final class ValueRow extends
+      com.google.protobuf.GeneratedMessageV3 implements
+      // @@protoc_insertion_point(message_implements:com.usthe.common.entity.message.ValueRow)
+      ValueRowOrBuilder {
+  private static final long serialVersionUID = 0L;
+    // Use ValueRow.newBuilder() to construct.
+    private ValueRow(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
+      super(builder);
+    }
+    private ValueRow() {
+      instance_ = "";
+      columns_ = com.google.protobuf.LazyStringArrayList.EMPTY;
+    }
+
+    @java.lang.Override
+    @SuppressWarnings({"unused"})
+    protected java.lang.Object newInstance(
+        UnusedPrivateParameter unused) {
+      return new ValueRow();
+    }
+
+    @java.lang.Override
+    public final com.google.protobuf.UnknownFieldSet
+    getUnknownFields() {
+      return this.unknownFields;
+    }
+    private ValueRow(
+        com.google.protobuf.CodedInputStream input,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      this();
+      if (extensionRegistry == null) {
+        throw new java.lang.NullPointerException();
+      }
+      int mutable_bitField0_ = 0;
+      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+          com.google.protobuf.UnknownFieldSet.newBuilder();
+      try {
+        boolean done = false;
+        while (!done) {
+          int tag = input.readTag();
+          switch (tag) {
+            case 0:
+              done = true;
+              break;
+            case 10: {
+              java.lang.String s = input.readStringRequireUtf8();
+
+              instance_ = s;
+              break;
+            }
+            case 18: {
+              java.lang.String s = input.readStringRequireUtf8();
+              if (!((mutable_bitField0_ & 0x00000001) != 0)) {
+                columns_ = new com.google.protobuf.LazyStringArrayList();
+                mutable_bitField0_ |= 0x00000001;
+              }
+              columns_.add(s);
+              break;
+            }
+            default: {
+              if (!parseUnknownField(
+                  input, unknownFields, extensionRegistry, tag)) {
+                done = true;
+              }
+              break;
+            }
+          }
+        }
+      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+        throw e.setUnfinishedMessage(this);
+      } catch (java.io.IOException e) {
+        throw new com.google.protobuf.InvalidProtocolBufferException(
+            e).setUnfinishedMessage(this);
+      } finally {
+        if (((mutable_bitField0_ & 0x00000001) != 0)) {
+          columns_ = columns_.getUnmodifiableView();
+        }
+        this.unknownFields = unknownFields.build();
+        makeExtensionsImmutable();
+      }
+    }
+    public static final com.google.protobuf.Descriptors.Descriptor
+        getDescriptor() {
+      return com.usthe.common.entity.message.CollectRep.internal_static_com_usthe_common_entity_message_ValueRow_descriptor;
+    }
+
+    @java.lang.Override
+    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+        internalGetFieldAccessorTable() {
+      return com.usthe.common.entity.message.CollectRep.internal_static_com_usthe_common_entity_message_ValueRow_fieldAccessorTable
+          .ensureFieldAccessorsInitialized(
+              com.usthe.common.entity.message.CollectRep.ValueRow.class, com.usthe.common.entity.message.CollectRep.ValueRow.Builder.class);
+    }
+
+    public static final int INSTANCE_FIELD_NUMBER = 1;
+    private volatile java.lang.Object instance_;
+    /**
+     * <pre>
+     * 主键实例,唯一标识这行数据
+     * </pre>
+     *
+     * <code>string instance = 1;</code>
+     * @return The instance.
+     */
+    @java.lang.Override
+    public java.lang.String getInstance() {
+      java.lang.Object ref = instance_;
+      if (ref instanceof java.lang.String) {
+        return (java.lang.String) ref;
+      } else {
+        com.google.protobuf.ByteString bs = 
+            (com.google.protobuf.ByteString) ref;
+        java.lang.String s = bs.toStringUtf8();
+        instance_ = s;
+        return s;
+      }
+    }
+    /**
+     * <pre>
+     * 主键实例,唯一标识这行数据
+     * </pre>
+     *
+     * <code>string instance = 1;</code>
+     * @return The bytes for instance.
+     */
+    @java.lang.Override
+    public com.google.protobuf.ByteString
+        getInstanceBytes() {
+      java.lang.Object ref = instance_;
+      if (ref instanceof java.lang.String) {
+        com.google.protobuf.ByteString b = 
+            com.google.protobuf.ByteString.copyFromUtf8(
+                (java.lang.String) ref);
+        instance_ = b;
+        return b;
+      } else {
+        return (com.google.protobuf.ByteString) ref;
+      }
+    }
+
+    public static final int COLUMNS_FIELD_NUMBER = 2;
+    private com.google.protobuf.LazyStringList columns_;
+    /**
+     * <pre>
+     * 采集指标值
+     * </pre>
+     *
+     * <code>repeated string columns = 2;</code>
+     * @return A list containing the columns.
+     */
+    public com.google.protobuf.ProtocolStringList
+        getColumnsList() {
+      return columns_;
+    }
+    /**
+     * <pre>
+     * 采集指标值
+     * </pre>
+     *
+     * <code>repeated string columns = 2;</code>
+     * @return The count of columns.
+     */
+    public int getColumnsCount() {
+      return columns_.size();
+    }
+    /**
+     * <pre>
+     * 采集指标值
+     * </pre>
+     *
+     * <code>repeated string columns = 2;</code>
+     * @param index The index of the element to return.
+     * @return The columns at the given index.
+     */
+    public java.lang.String getColumns(int index) {
+      return columns_.get(index);
+    }
+    /**
+     * <pre>
+     * 采集指标值
+     * </pre>
+     *
+     * <code>repeated string columns = 2;</code>
+     * @param index The index of the value to return.
+     * @return The bytes of the columns at the given index.
+     */
+    public com.google.protobuf.ByteString
+        getColumnsBytes(int index) {
+      return columns_.getByteString(index);
+    }
+
+    private byte memoizedIsInitialized = -1;
+    @java.lang.Override
+    public final boolean isInitialized() {
+      byte isInitialized = memoizedIsInitialized;
+      if (isInitialized == 1) return true;
+      if (isInitialized == 0) return false;
+
+      memoizedIsInitialized = 1;
+      return true;
+    }
+
+    @java.lang.Override
+    public void writeTo(com.google.protobuf.CodedOutputStream output)
+                        throws java.io.IOException {
+      if (!getInstanceBytes().isEmpty()) {
+        com.google.protobuf.GeneratedMessageV3.writeString(output, 1, instance_);
+      }
+      for (int i = 0; i < columns_.size(); i++) {
+        com.google.protobuf.GeneratedMessageV3.writeString(output, 2, columns_.getRaw(i));
+      }
+      unknownFields.writeTo(output);
+    }
+
+    @java.lang.Override
+    public int getSerializedSize() {
+      int size = memoizedSize;
+      if (size != -1) return size;
+
+      size = 0;
+      if (!getInstanceBytes().isEmpty()) {
+        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, instance_);
+      }
+      {
+        int dataSize = 0;
+        for (int i = 0; i < columns_.size(); i++) {
+          dataSize += computeStringSizeNoTag(columns_.getRaw(i));
+        }
+        size += dataSize;
+        size += 1 * getColumnsList().size();
+      }
+      size += unknownFields.getSerializedSize();
+      memoizedSize = size;
+      return size;
+    }
+
+    @java.lang.Override
+    public boolean equals(final java.lang.Object obj) {
+      if (obj == this) {
+       return true;
+      }
+      if (!(obj instanceof com.usthe.common.entity.message.CollectRep.ValueRow)) {
+        return super.equals(obj);
+      }
+      com.usthe.common.entity.message.CollectRep.ValueRow other = (com.usthe.common.entity.message.CollectRep.ValueRow) obj;
+
+      if (!getInstance()
+          .equals(other.getInstance())) return false;
+      if (!getColumnsList()
+          .equals(other.getColumnsList())) return false;
+      if (!unknownFields.equals(other.unknownFields)) return false;
+      return true;
+    }
+
+    @java.lang.Override
+    public int hashCode() {
+      if (memoizedHashCode != 0) {
+        return memoizedHashCode;
+      }
+      int hash = 41;
+      hash = (19 * hash) + getDescriptor().hashCode();
+      hash = (37 * hash) + INSTANCE_FIELD_NUMBER;
+      hash = (53 * hash) + getInstance().hashCode();
+      if (getColumnsCount() > 0) {
+        hash = (37 * hash) + COLUMNS_FIELD_NUMBER;
+        hash = (53 * hash) + getColumnsList().hashCode();
+      }
+      hash = (29 * hash) + unknownFields.hashCode();
+      memoizedHashCode = hash;
+      return hash;
+    }
+
+    public static com.usthe.common.entity.message.CollectRep.ValueRow parseFrom(
+        java.nio.ByteBuffer data)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      return PARSER.parseFrom(data);
+    }
+    public static com.usthe.common.entity.message.CollectRep.ValueRow parseFrom(
+        java.nio.ByteBuffer data,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      return PARSER.parseFrom(data, extensionRegistry);
+    }
+    public static com.usthe.common.entity.message.CollectRep.ValueRow parseFrom(
+        com.google.protobuf.ByteString data)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      return PARSER.parseFrom(data);
+    }
+    public static com.usthe.common.entity.message.CollectRep.ValueRow parseFrom(
+        com.google.protobuf.ByteString data,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      return PARSER.parseFrom(data, extensionRegistry);
+    }
+    public static com.usthe.common.entity.message.CollectRep.ValueRow parseFrom(byte[] data)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      return PARSER.parseFrom(data);
+    }
+    public static com.usthe.common.entity.message.CollectRep.ValueRow parseFrom(
+        byte[] data,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      return PARSER.parseFrom(data, extensionRegistry);
+    }
+    public static com.usthe.common.entity.message.CollectRep.ValueRow parseFrom(java.io.InputStream input)
+        throws java.io.IOException {
+      return com.google.protobuf.GeneratedMessageV3
+          .parseWithIOException(PARSER, input);
+    }
+    public static com.usthe.common.entity.message.CollectRep.ValueRow parseFrom(
+        java.io.InputStream input,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws java.io.IOException {
+      return com.google.protobuf.GeneratedMessageV3
+          .parseWithIOException(PARSER, input, extensionRegistry);
+    }
+    public static com.usthe.common.entity.message.CollectRep.ValueRow parseDelimitedFrom(java.io.InputStream input)
+        throws java.io.IOException {
+      return com.google.protobuf.GeneratedMessageV3
+          .parseDelimitedWithIOException(PARSER, input);
+    }
+    public static com.usthe.common.entity.message.CollectRep.ValueRow parseDelimitedFrom(
+        java.io.InputStream input,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws java.io.IOException {
+      return com.google.protobuf.GeneratedMessageV3
+          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
+    }
+    public static com.usthe.common.entity.message.CollectRep.ValueRow parseFrom(
+        com.google.protobuf.CodedInputStream input)
+        throws java.io.IOException {
+      return com.google.protobuf.GeneratedMessageV3
+          .parseWithIOException(PARSER, input);
+    }
+    public static com.usthe.common.entity.message.CollectRep.ValueRow parseFrom(
+        com.google.protobuf.CodedInputStream input,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws java.io.IOException {
+      return com.google.protobuf.GeneratedMessageV3
+          .parseWithIOException(PARSER, input, extensionRegistry);
+    }
+
+    @java.lang.Override
+    public Builder newBuilderForType() { return newBuilder(); }
+    public static Builder newBuilder() {
+      return DEFAULT_INSTANCE.toBuilder();
+    }
+    public static Builder newBuilder(com.usthe.common.entity.message.CollectRep.ValueRow prototype) {
+      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+    }
+    @java.lang.Override
+    public Builder toBuilder() {
+      return this == DEFAULT_INSTANCE
+          ? new Builder() : new Builder().mergeFrom(this);
+    }
+
+    @java.lang.Override
+    protected Builder newBuilderForType(
+        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+      Builder builder = new Builder(parent);
+      return builder;
+    }
+    /**
+     * Protobuf type {@code com.usthe.common.entity.message.ValueRow}
+     */
+    public static final class Builder extends
+        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
+        // @@protoc_insertion_point(builder_implements:com.usthe.common.entity.message.ValueRow)
+        com.usthe.common.entity.message.CollectRep.ValueRowOrBuilder {
+      public static final com.google.protobuf.Descriptors.Descriptor
+          getDescriptor() {
+        return com.usthe.common.entity.message.CollectRep.internal_static_com_usthe_common_entity_message_ValueRow_descriptor;
+      }
+
+      @java.lang.Override
+      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+          internalGetFieldAccessorTable() {
+        return com.usthe.common.entity.message.CollectRep.internal_static_com_usthe_common_entity_message_ValueRow_fieldAccessorTable
+            .ensureFieldAccessorsInitialized(
+                com.usthe.common.entity.message.CollectRep.ValueRow.class, com.usthe.common.entity.message.CollectRep.ValueRow.Builder.class);
+      }
+
+      // Construct using com.usthe.common.entity.message.CollectRep.ValueRow.newBuilder()
+      private Builder() {
+        maybeForceBuilderInitialization();
+      }
+
+      private Builder(
+          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+        super(parent);
+        maybeForceBuilderInitialization();
+      }
+      private void maybeForceBuilderInitialization() {
+        if (com.google.protobuf.GeneratedMessageV3
+                .alwaysUseFieldBuilders) {
+        }
+      }
+      @java.lang.Override
+      public Builder clear() {
+        super.clear();
+        instance_ = "";
+
+        columns_ = com.google.protobuf.LazyStringArrayList.EMPTY;
+        bitField0_ = (bitField0_ & ~0x00000001);
+        return this;
+      }
+
+      @java.lang.Override
+      public com.google.protobuf.Descriptors.Descriptor
+          getDescriptorForType() {
+        return com.usthe.common.entity.message.CollectRep.internal_static_com_usthe_common_entity_message_ValueRow_descriptor;
+      }
+
+      @java.lang.Override
+      public com.usthe.common.entity.message.CollectRep.ValueRow getDefaultInstanceForType() {
+        return com.usthe.common.entity.message.CollectRep.ValueRow.getDefaultInstance();
+      }
+
+      @java.lang.Override
+      public com.usthe.common.entity.message.CollectRep.ValueRow build() {
+        com.usthe.common.entity.message.CollectRep.ValueRow result = buildPartial();
+        if (!result.isInitialized()) {
+          throw newUninitializedMessageException(result);
+        }
+        return result;
+      }
+
+      @java.lang.Override
+      public com.usthe.common.entity.message.CollectRep.ValueRow buildPartial() {
+        com.usthe.common.entity.message.CollectRep.ValueRow result = new com.usthe.common.entity.message.CollectRep.ValueRow(this);
+        int from_bitField0_ = bitField0_;
+        result.instance_ = instance_;
+        if (((bitField0_ & 0x00000001) != 0)) {
+          columns_ = columns_.getUnmodifiableView();
+          bitField0_ = (bitField0_ & ~0x00000001);
+        }
+        result.columns_ = columns_;
+        onBuilt();
+        return result;
+      }
+
+      @java.lang.Override
+      public Builder clone() {
+        return super.clone();
+      }
+      @java.lang.Override
+      public Builder setField(
+          com.google.protobuf.Descriptors.FieldDescriptor field,
+          java.lang.Object value) {
+        return super.setField(field, value);
+      }
+      @java.lang.Override
+      public Builder clearField(
+          com.google.protobuf.Descriptors.FieldDescriptor field) {
+        return super.clearField(field);
+      }
+      @java.lang.Override
+      public Builder clearOneof(
+          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+        return super.clearOneof(oneof);
+      }
+      @java.lang.Override
+      public Builder setRepeatedField(
+          com.google.protobuf.Descriptors.FieldDescriptor field,
+          int index, java.lang.Object value) {
+        return super.setRepeatedField(field, index, value);
+      }
+      @java.lang.Override
+      public Builder addRepeatedField(
+          com.google.protobuf.Descriptors.FieldDescriptor field,
+          java.lang.Object value) {
+        return super.addRepeatedField(field, value);
+      }
+      @java.lang.Override
+      public Builder mergeFrom(com.google.protobuf.Message other) {
+        if (other instanceof com.usthe.common.entity.message.CollectRep.ValueRow) {
+          return mergeFrom((com.usthe.common.entity.message.CollectRep.ValueRow)other);
+        } else {
+          super.mergeFrom(other);
+          return this;
+        }
+      }
+
+      public Builder mergeFrom(com.usthe.common.entity.message.CollectRep.ValueRow other) {
+        if (other == com.usthe.common.entity.message.CollectRep.ValueRow.getDefaultInstance()) return this;
+        if (!other.getInstance().isEmpty()) {
+          instance_ = other.instance_;
+          onChanged();
+        }
+        if (!other.columns_.isEmpty()) {
+          if (columns_.isEmpty()) {
+            columns_ = other.columns_;
+            bitField0_ = (bitField0_ & ~0x00000001);
+          } else {
+            ensureColumnsIsMutable();
+            columns_.addAll(other.columns_);
+          }
+          onChanged();
+        }
+        this.mergeUnknownFields(other.unknownFields);
+        onChanged();
+        return this;
+      }
+
+      @java.lang.Override
+      public final boolean isInitialized() {
+        return true;
+      }
+
+      @java.lang.Override
+      public Builder mergeFrom(
+          com.google.protobuf.CodedInputStream input,
+          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+          throws java.io.IOException {
+        com.usthe.common.entity.message.CollectRep.ValueRow parsedMessage = null;
+        try {
+          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+          parsedMessage = (com.usthe.common.entity.message.CollectRep.ValueRow) e.getUnfinishedMessage();
+          throw e.unwrapIOException();
+        } finally {
+          if (parsedMessage != null) {
+            mergeFrom(parsedMessage);
+          }
+        }
+        return this;
+      }
+      private int bitField0_;
+
+      private java.lang.Object instance_ = "";
+      /**
+       * <pre>
+       * 主键实例,唯一标识这行数据
+       * </pre>
+       *
+       * <code>string instance = 1;</code>
+       * @return The instance.
+       */
+      public java.lang.String getInstance() {
+        java.lang.Object ref = instance_;
+        if (!(ref instanceof java.lang.String)) {
+          com.google.protobuf.ByteString bs =
+              (com.google.protobuf.ByteString) ref;
+          java.lang.String s = bs.toStringUtf8();
+          instance_ = s;
+          return s;
+        } else {
+          return (java.lang.String) ref;
+        }
+      }
+      /**
+       * <pre>
+       * 主键实例,唯一标识这行数据
+       * </pre>
+       *
+       * <code>string instance = 1;</code>
+       * @return The bytes for instance.
+       */
+      public com.google.protobuf.ByteString
+          getInstanceBytes() {
+        java.lang.Object ref = instance_;
+        if (ref instanceof String) {
+          com.google.protobuf.ByteString b = 
+              com.google.protobuf.ByteString.copyFromUtf8(
+                  (java.lang.String) ref);
+          instance_ = b;
+          return b;
+        } else {
+          return (com.google.protobuf.ByteString) ref;
+        }
+      }
+      /**
+       * <pre>
+       * 主键实例,唯一标识这行数据
+       * </pre>
+       *
+       * <code>string instance = 1;</code>
+       * @param value The instance to set.
+       * @return This builder for chaining.
+       */
+      public Builder setInstance(
+          java.lang.String value) {
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  
+        instance_ = value;
+        onChanged();
+        return this;
+      }
+      /**
+       * <pre>
+       * 主键实例,唯一标识这行数据
+       * </pre>
+       *
+       * <code>string instance = 1;</code>
+       * @return This builder for chaining.
+       */
+      public Builder clearInstance() {
+        
+        instance_ = getDefaultInstance().getInstance();
+        onChanged();
+        return this;
+      }
+      /**
+       * <pre>
+       * 主键实例,唯一标识这行数据
+       * </pre>
+       *
+       * <code>string instance = 1;</code>
+       * @param value The bytes for instance to set.
+       * @return This builder for chaining.
+       */
+      public Builder setInstanceBytes(
+          com.google.protobuf.ByteString value) {
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  checkByteStringIsUtf8(value);
+        
+        instance_ = value;
+        onChanged();
+        return this;
+      }
+
+      private com.google.protobuf.LazyStringList columns_ = com.google.protobuf.LazyStringArrayList.EMPTY;
+      private void ensureColumnsIsMutable() {
+        if (!((bitField0_ & 0x00000001) != 0)) {
+          columns_ = new com.google.protobuf.LazyStringArrayList(columns_);
+          bitField0_ |= 0x00000001;
+         }
+      }
+      /**
+       * <pre>
+       * 采集指标值
+       * </pre>
+       *
+       * <code>repeated string columns = 2;</code>
+       * @return A list containing the columns.
+       */
+      public com.google.protobuf.ProtocolStringList
+          getColumnsList() {
+        return columns_.getUnmodifiableView();
+      }
+      /**
+       * <pre>
+       * 采集指标值
+       * </pre>
+       *
+       * <code>repeated string columns = 2;</code>
+       * @return The count of columns.
+       */
+      public int getColumnsCount() {
+        return columns_.size();
+      }
+      /**
+       * <pre>
+       * 采集指标值
+       * </pre>
+       *
+       * <code>repeated string columns = 2;</code>
+       * @param index The index of the element to return.
+       * @return The columns at the given index.
+       */
+      public java.lang.String getColumns(int index) {
+        return columns_.get(index);
+      }
+      /**
+       * <pre>
+       * 采集指标值
+       * </pre>
+       *
+       * <code>repeated string columns = 2;</code>
+       * @param index The index of the value to return.
+       * @return The bytes of the columns at the given index.
+       */
+      public com.google.protobuf.ByteString
+          getColumnsBytes(int index) {
+        return columns_.getByteString(index);
+      }
+      /**
+       * <pre>
+       * 采集指标值
+       * </pre>
+       *
+       * <code>repeated string columns = 2;</code>
+       * @param index The index to set the value at.
+       * @param value The columns to set.
+       * @return This builder for chaining.
+       */
+      public Builder setColumns(
+          int index, java.lang.String value) {
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  ensureColumnsIsMutable();
+        columns_.set(index, value);
+        onChanged();
+        return this;
+      }
+      /**
+       * <pre>
+       * 采集指标值
+       * </pre>
+       *
+       * <code>repeated string columns = 2;</code>
+       * @param value The columns to add.
+       * @return This builder for chaining.
+       */
+      public Builder addColumns(
+          java.lang.String value) {
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  ensureColumnsIsMutable();
+        columns_.add(value);
+        onChanged();
+        return this;
+      }
+      /**
+       * <pre>
+       * 采集指标值
+       * </pre>
+       *
+       * <code>repeated string columns = 2;</code>
+       * @param values The columns to add.
+       * @return This builder for chaining.
+       */
+      public Builder addAllColumns(
+          java.lang.Iterable<java.lang.String> values) {
+        ensureColumnsIsMutable();
+        com.google.protobuf.AbstractMessageLite.Builder.addAll(
+            values, columns_);
+        onChanged();
+        return this;
+      }
+      /**
+       * <pre>
+       * 采集指标值
+       * </pre>
+       *
+       * <code>repeated string columns = 2;</code>
+       * @return This builder for chaining.
+       */
+      public Builder clearColumns() {
+        columns_ = com.google.protobuf.LazyStringArrayList.EMPTY;
+        bitField0_ = (bitField0_ & ~0x00000001);
+        onChanged();
+        return this;
+      }
+      /**
+       * <pre>
+       * 采集指标值
+       * </pre>
+       *
+       * <code>repeated string columns = 2;</code>
+       * @param value The bytes of the columns to add.
+       * @return This builder for chaining.
+       */
+      public Builder addColumnsBytes(
+          com.google.protobuf.ByteString value) {
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  checkByteStringIsUtf8(value);
+        ensureColumnsIsMutable();
+        columns_.add(value);
+        onChanged();
+        return this;
+      }
+      @java.lang.Override
+      public final Builder setUnknownFields(
+          final com.google.protobuf.UnknownFieldSet unknownFields) {
+        return super.setUnknownFields(unknownFields);
+      }
+
+      @java.lang.Override
+      public final Builder mergeUnknownFields(
+          final com.google.protobuf.UnknownFieldSet unknownFields) {
+        return super.mergeUnknownFields(unknownFields);
+      }
+
+
+      // @@protoc_insertion_point(builder_scope:com.usthe.common.entity.message.ValueRow)
+    }
+
+    // @@protoc_insertion_point(class_scope:com.usthe.common.entity.message.ValueRow)
+    private static final com.usthe.common.entity.message.CollectRep.ValueRow DEFAULT_INSTANCE;
+    static {
+      DEFAULT_INSTANCE = new com.usthe.common.entity.message.CollectRep.ValueRow();
+    }
+
+    public static com.usthe.common.entity.message.CollectRep.ValueRow getDefaultInstance() {
+      return DEFAULT_INSTANCE;
+    }
+
+    private static final com.google.protobuf.Parser<ValueRow>
+        PARSER = new com.google.protobuf.AbstractParser<ValueRow>() {
+      @java.lang.Override
+      public ValueRow parsePartialFrom(
+          com.google.protobuf.CodedInputStream input,
+          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+          throws com.google.protobuf.InvalidProtocolBufferException {
+        return new ValueRow(input, extensionRegistry);
+      }
+    };
+
+    public static com.google.protobuf.Parser<ValueRow> parser() {
+      return PARSER;
+    }
+
+    @java.lang.Override
+    public com.google.protobuf.Parser<ValueRow> getParserForType() {
+      return PARSER;
+    }
+
+    @java.lang.Override
+    public com.usthe.common.entity.message.CollectRep.ValueRow getDefaultInstanceForType() {
+      return DEFAULT_INSTANCE;
+    }
+
+  }
+
+  private static final com.google.protobuf.Descriptors.Descriptor
+    internal_static_com_usthe_common_entity_message_MetricsData_descriptor;
+  private static final 
+    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+      internal_static_com_usthe_common_entity_message_MetricsData_fieldAccessorTable;
+  private static final com.google.protobuf.Descriptors.Descriptor
+    internal_static_com_usthe_common_entity_message_ValueRow_descriptor;
+  private static final 
+    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+      internal_static_com_usthe_common_entity_message_ValueRow_fieldAccessorTable;
+
+  public static com.google.protobuf.Descriptors.FileDescriptor
+      getDescriptor() {
+    return descriptor;
+  }
+  private static  com.google.protobuf.Descriptors.FileDescriptor
+      descriptor;
+  static {
+    java.lang.String[] descriptorData = {
+      "\n\021collect_rep.proto\022\037com.usthe.common.en" +
+      "tity.message\"\322\001\n\013MetricsData\022\n\n\002id\030\001 \001(\004" +
+      "\022\013\n\003app\030\002 \001(\t\022\017\n\007metrics\030\003 \001(\t\022\014\n\004time\030\004" +
+      " \001(\004\0223\n\004code\030\005 \001(\0162%.com.usthe.common.en" +
+      "tity.message.Code\022\013\n\003msg\030\006 \001(\t\022\016\n\006fields" +
+      "\030\007 \003(\t\0229\n\006values\030\010 \003(\0132).com.usthe.commo" +
+      "n.entity.message.ValueRow\"-\n\010ValueRow\022\020\n" +
+      "\010instance\030\001 \001(\t\022\017\n\007columns\030\002 \003(\t*b\n\004Code" +
+      "\022\013\n\007SUCCESS\020\000\022\020\n\014UN_AVAILABLE\020\001\022\020\n\014UN_RE" +
+      "ACHABLE\020\002\022\022\n\016UN_CONNECTABLE\020\003\022\010\n\004FAIL\020\004\022" +
+      "\013\n\007TIMEOUT\020\005b\006proto3"
+    };
+    descriptor = com.google.protobuf.Descriptors.FileDescriptor
+      .internalBuildGeneratedFileFrom(descriptorData,
+        new com.google.protobuf.Descriptors.FileDescriptor[] {
+        });
+    internal_static_com_usthe_common_entity_message_MetricsData_descriptor =
+      getDescriptor().getMessageTypes().get(0);
+    internal_static_com_usthe_common_entity_message_MetricsData_fieldAccessorTable = new
+      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+        internal_static_com_usthe_common_entity_message_MetricsData_descriptor,
+        new java.lang.String[] { "Id", "App", "Metrics", "Time", "Code", "Msg", "Fields", "Values", });
+    internal_static_com_usthe_common_entity_message_ValueRow_descriptor =
+      getDescriptor().getMessageTypes().get(1);
+    internal_static_com_usthe_common_entity_message_ValueRow_fieldAccessorTable = new
+      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+        internal_static_com_usthe_common_entity_message_ValueRow_descriptor,
+        new java.lang.String[] { "Instance", "Columns", });
+  }
+
+  // @@protoc_insertion_point(outer_class_scope)
+}

+ 41 - 0
common/src/main/java/com/usthe/common/util/GsonUtil.java

@@ -0,0 +1,41 @@
+package com.usthe.common.util;
+
+import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
+import io.etcd.jetcd.ByteSequence;
+
+import javax.annotation.concurrent.ThreadSafe;
+import java.nio.charset.StandardCharsets;
+
+/**
+ * gson 工具类
+ * @author tomsun28
+ * @date 2021/10/16 20:49
+ */
+@ThreadSafe
+public class GsonUtil {
+
+    private static Gson gson;
+
+    static {
+        gson = new GsonBuilder().enableComplexMapKeySerialization()
+                .serializeNulls()
+                .create();
+    }
+
+    public static String toJson(Object source) {
+        return gson.toJson(source);
+    }
+
+    public static <T> T fromJson(String jsonStr, Class<T> clazz) {
+        return gson.fromJson(jsonStr, clazz);
+    }
+
+    public static <T> T fromJson(ByteSequence byteSequence, Class<T> clazz) {
+        if (byteSequence == null || byteSequence.isEmpty()) {
+            return null;
+        }
+        return gson.fromJson(byteSequence.toString(StandardCharsets.UTF_8), clazz);
+    }
+
+}

+ 46 - 0
common/src/main/message/collect_rep.proto

@@ -0,0 +1,46 @@
+syntax = "proto3";
+package com.usthe.common.entity.message;
+
+message MetricsData
+{
+    // 监控的ID
+    uint64 id = 1;
+    // 监控的类型 eg: linux | mysql | jvm
+    string app = 2;
+    // 监控采集的指标集合 eg: cpu | memory | health
+    string metrics = 3;
+    // 采集时间
+    uint64 time = 4;
+    // 采集响应码
+    Code code = 5;
+    // 采集响应信息
+    string msg = 6;
+    // 采集指标名
+    repeated string fields = 7;
+    // 采集指标值集合(fields作为字段名称与ValueRow映射)
+    repeated ValueRow values = 8;
+}
+
+message ValueRow
+{
+    // 主键实例,唯一标识这行数据
+    string instance = 1;
+    // 采集指标值
+    repeated string columns = 2;
+}
+
+enum Code
+{
+    // 采集成功
+    SUCCESS = 0;
+    // 采集器不可用
+    UN_AVAILABLE = 1;
+    // 对端不可达(网络层icmp)
+    UN_REACHABLE = 2;
+    // 对端连接失败(传输层tcp,udp)
+    UN_CONNECTABLE = 3;
+    // 数据采集失败(应用层http,ssh,snmp)
+    FAIL = 4;
+    // 采集超时
+    TIMEOUT = 5;
+}

+ 18 - 0
manager/pom.xml

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>monitor</artifactId>
+        <groupId>com.usthe.tancloud</groupId>
+        <version>1.0-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>manager</artifactId>
+
+    <properties>
+
+    </properties>
+
+</project>

+ 129 - 0
pom.xml

@@ -0,0 +1,129 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <groupId>com.usthe.tancloud</groupId>
+    <artifactId>monitor</artifactId>
+    <packaging>pom</packaging>
+    <version>1.0-SNAPSHOT</version>
+    <modules>
+        <module>scheduler</module>
+        <module>manager</module>
+        <module>alerter</module>
+        <module>common</module>
+        <module>collector</module>
+    </modules>
+
+    <properties>
+        <java.version>1.8</java.version>
+        <maven.compiler.source>1.8</maven.compiler.source>
+        <maven.compiler.target>1.8</maven.compiler.target>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <slf4j.version>1.7.21</slf4j.version>
+        <xml.bind.version>2.3.0</xml.bind.version>
+        <lombok.version>1.18.20</lombok.version>
+        <!-- Test 3rd-party dependencies: -->
+        <junit.version>5.7.0</junit.version>
+        <easymock.version>4.0.2</easymock.version>
+    </properties>
+
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <!-- Import dependency management from Spring Boot -->
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-dependencies</artifactId>
+                <version>2.4.5</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+            <dependency>
+                <groupId>javax.xml.bind</groupId>
+                <artifactId>jaxb-api</artifactId>
+                <version>${xml.bind.version}</version>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+
+    <dependencies>
+        <!-- 工具 -->
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+            <version>${slf4j.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
+            <version>${lombok.version}</version>
+            <scope>provided</scope>
+        </dependency>
+        <!-- Test 3rd-party dependencies: -->
+        <dependency>
+            <groupId>org.junit.jupiter</groupId>
+            <artifactId>junit-jupiter</artifactId>
+            <version>${junit.version}</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.easymock</groupId>
+            <artifactId>easymock</artifactId>
+            <version>${easymock.version}</version>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <version>3.8.1</version>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-surefire-plugin</artifactId>
+                <version>2.22.2</version>
+            </plugin>
+            <!-- java code style check -->
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-pmd-plugin</artifactId>
+                <version>3.8</version>
+                <configuration>
+                    <rulesets>
+                        <ruleset>rulesets/java/ali-comment.xml</ruleset>
+                        <ruleset>rulesets/java/ali-concurrent.xml</ruleset>
+                        <ruleset>rulesets/java/ali-constant.xml</ruleset>
+                        <ruleset>rulesets/java/ali-exception.xml</ruleset>
+                        <!--                        <ruleset>rulesets/java/ali-flowcontrol.xml</ruleset>-->
+                        <ruleset>rulesets/java/ali-naming.xml</ruleset>
+                        <ruleset>rulesets/java/ali-oop.xml</ruleset>
+                        <ruleset>rulesets/java/ali-orm.xml</ruleset>
+                        <ruleset>rulesets/java/ali-other.xml</ruleset>
+                        <ruleset>rulesets/java/ali-set.xml</ruleset>
+                    </rulesets>
+                    <printFailingErrors>true</printFailingErrors>
+                </configuration>
+                <executions>
+                    <execution>
+                        <id>validate</id>
+                        <phase>validate</phase>
+                        <goals>
+                            <goal>check</goal>
+                        </goals>
+                    </execution>
+                </executions>
+                <dependencies>
+                    <dependency>
+                        <groupId>com.alibaba.p3c</groupId>
+                        <artifactId>p3c-pmd</artifactId>
+                        <version>1.3.0</version>
+                    </dependency>
+                </dependencies>
+            </plugin>
+        </plugins>
+    </build>
+</project>