Skip to content

Commit

Permalink
feat: support mysqlplugin of local collect (#821)
Browse files Browse the repository at this point in the history
  • Loading branch information
jsy1001de authored Mar 18, 2024
1 parent 1f3745c commit af8b8b0
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
* @version 1.0: CollectType.java, Date: 2023-08-09 Time: 14:59
*/
public enum CollectType {
CENTER, LOCAL, OB_CLIENT
CENTER, LOCAL, OB_CLIENT, MYSQL_CLIENT

}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/
package io.holoinsight.server.registry.model.integration.ob;
package io.holoinsight.server.registry.model.integration;

import lombok.AllArgsConstructor;
import lombok.Data;
Expand All @@ -10,12 +10,12 @@
/**
*
* @author zzhb101
* @version 1.0: ObMetricConf.java, v 0.1 2022年11月21日 下午12:02 jinsong.yjs Exp $
* @version 1.0: CollectMetricConf.java, v 0.1 2022年11月21日 下午12:02 jinsong.yjs Exp $
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ObMetricConf {
public class CollectMetricConf {
public String name;
public String metricType;
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@ public class IntegrationTransForm {

private List<String> metricWhiteList;
private Map<String, Map<String, String>> metricConfigs;
private List<String> scripts;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
* Copyright 2022 Holoinsight Project Authors. Licensed under Apache-2.0.
*/

package io.holoinsight.server.registry.model.integration.mysql;

import io.holoinsight.server.registry.model.integration.CollectMetricConf;
import io.holoinsight.server.registry.model.integration.LocalIntegrationTask;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.util.List;

/**
* @author jsy1001de
* @version 1.0: MysqlTaskV3.java, Date: 2024-03-15 Time: 10:59
*/
@EqualsAndHashCode(callSuper = true)
@Data
@NoArgsConstructor
public class MysqlTaskV3 extends LocalIntegrationTask {
private String username;
private String password;
public Integer port;
public String sql;
public List<CollectMetricConf> metrics;
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
package io.holoinsight.server.registry.model.integration.ob;

import io.holoinsight.server.registry.model.integration.LocalIntegrationTask;
import io.holoinsight.server.registry.model.integration.CollectMetricConf;
import lombok.Data;
import lombok.NoArgsConstructor;

Expand All @@ -21,5 +22,5 @@ public class ObTask extends LocalIntegrationTask {
public String network;
public Integer port;
public String dbName;
public List<ObMetricConf> metrics;
public List<CollectMetricConf> metrics;
}

0 comments on commit af8b8b0

Please sign in to comment.