-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WIP:feature support k8s monitor, http monitor nacos, service&http_mic…
…ro monitor msa (#421) [collector] bugfix: Solve imprecise cyclicJob execution interval problem. 1.wheelTimer tickDuration from 10s changed to 1s,ticksPerWheel remain unchanged. 2.now support second level job interval. [manager] elasticsearch support ssl as an option [monitor] 1.K8sClient monitor k8s 2.http monitor nacos 3.service&http_micro monitor msa [collector]fix pmd problem
- Loading branch information
1 parent
6f6c0e3
commit 58354b6
Showing
40 changed files
with
3,208 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
80 changes: 80 additions & 0 deletions
80
collector/src/main/java/com/usthe/collector/collect/AbstractParseResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
package com.usthe.collector.collect; | ||
|
||
import com.usthe.common.entity.job.protocol.ServiceProtocol; | ||
import com.usthe.common.model.ServicePodModel; | ||
import com.usthe.common.entity.job.Metrics; | ||
import com.usthe.common.entity.job.protocol.HttpProtocol; | ||
import com.usthe.common.entity.message.CollectRep; | ||
import org.springframework.beans.factory.InitializingBean; | ||
|
||
import java.util.List; | ||
import java.util.Map; | ||
|
||
|
||
/** | ||
* 不同数据格式解析抽象类 | ||
* | ||
* | ||
*/ | ||
|
||
public interface AbstractParseResponse extends InitializingBean { | ||
/** | ||
* 通用解析抽象方法 | ||
* | ||
* @param resp | ||
* @param aliasFields | ||
* @param http | ||
* @param builder | ||
* @param responseTime | ||
*/ | ||
public default void parseResponse(String resp, List<String> aliasFields, HttpProtocol http, | ||
CollectRep.MetricsData.Builder builder, Long responseTime) { | ||
|
||
} | ||
|
||
/** | ||
* k8s解析方式 | ||
* | ||
* @param metrics | ||
* @param resp | ||
* @param podMap | ||
* @param aliasFields | ||
* @param service | ||
* @param builder | ||
* @param responseTime | ||
*/ | ||
public default void parseK8sApi(Metrics metrics, Object resp, Map<String, ServicePodModel> podMap, List<String> aliasFields, ServiceProtocol service, | ||
CollectRep.MetricsData.Builder builder, Long responseTime) { | ||
|
||
} | ||
|
||
/** | ||
* 微服务响应体解析方法 | ||
* @param resp | ||
* @param fields | ||
* @param aliasFields | ||
* @param jsonScript | ||
* @param http | ||
* @param tempcloums | ||
* @param kv | ||
*/ | ||
public default void parseResponse(String resp,List<String> fields, List<String> aliasFields ,List<String> jsonScript, HttpProtocol http, | ||
Map<String,List<String>> tempcloums,String kv){ | ||
|
||
} | ||
|
||
/** | ||
* 微服务响应体解析方法 | ||
* @param resp | ||
* @param field | ||
* @param aliasField | ||
* @param jsonScript | ||
* @param http | ||
* @param tempcloums | ||
* @param kv | ||
*/ | ||
public default void parseResponse(String resp,String field, String aliasField ,String jsonScript, HttpProtocol http, | ||
Map<String,List<String>> tempcloums,String kv){ | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.