[manager,collector]feature:api monitor support query params (#59)
This commit is contained in:
@@ -90,7 +90,7 @@ public class WheelTimerTask implements TimerTask {
|
|||||||
if (key != null && key.startsWith("^_^") && key.endsWith("^_^")) {
|
if (key != null && key.startsWith("^_^") && key.endsWith("^_^")) {
|
||||||
key = key.replaceAll("\\^_\\^", "");
|
key = key.replaceAll("\\^_\\^", "");
|
||||||
Configmap param = configmap.get(key);
|
Configmap param = configmap.get(key);
|
||||||
if (param.getType() == (byte) 3) {
|
if (param != null && param.getType() == (byte) 3) {
|
||||||
String jsonValue = (String) param.getValue();
|
String jsonValue = (String) param.getValue();
|
||||||
Map<String, String> map = GsonUtil.fromJson(jsonValue, Map.class);
|
Map<String, String> map = GsonUtil.fromJson(jsonValue, Map.class);
|
||||||
if (map != null) {
|
if (map != null) {
|
||||||
|
|||||||
@@ -28,6 +28,8 @@ configmap:
|
|||||||
type: 1
|
type: 1
|
||||||
- key: headers
|
- key: headers
|
||||||
type: 3
|
type: 3
|
||||||
|
- key: params
|
||||||
|
type: 3
|
||||||
# 指标组列表
|
# 指标组列表
|
||||||
metrics:
|
metrics:
|
||||||
# 第一个监控指标组 cpu
|
# 第一个监控指标组 cpu
|
||||||
@@ -61,6 +63,9 @@ metrics:
|
|||||||
headers:
|
headers:
|
||||||
content-type: ^_^contentType^_^
|
content-type: ^_^contentType^_^
|
||||||
^_^headers^_^: ^_^headers^_^
|
^_^headers^_^: ^_^headers^_^
|
||||||
|
# 请求参数内容
|
||||||
|
params:
|
||||||
|
^_^params^_^: ^_^params^_^
|
||||||
# 认证
|
# 认证
|
||||||
authorization:
|
authorization:
|
||||||
# 认证方式: Basic Auth, Digest Auth, Bearer Token
|
# 认证方式: Basic Auth, Digest Auth, Bearer Token
|
||||||
|
|||||||
@@ -49,6 +49,12 @@ param:
|
|||||||
required: false
|
required: false
|
||||||
keyAlias: Header Name
|
keyAlias: Header Name
|
||||||
valueAlias: Header Value
|
valueAlias: Header Value
|
||||||
|
- field: params
|
||||||
|
name: 查询Params
|
||||||
|
type: key-value
|
||||||
|
required: false
|
||||||
|
keyAlias: Param Key
|
||||||
|
valueAlias: Param Value
|
||||||
- field: contentType
|
- field: contentType
|
||||||
name: Content-Type
|
name: Content-Type
|
||||||
type: text
|
type: text
|
||||||
|
|||||||
Reference in New Issue
Block a user