-
Notifications
You must be signed in to change notification settings - Fork 147
query from http
/metrics/list
例如: http://localhost:8006/metrics/list:
{
data: {
jvm: [
{
interval: 15,
metric: "jvm.buffer_pool.direct.capacity",
metricLevel: "NORMAL",
metricType: "GAUGE",
tags: {}
},
{
interval: 15,
metric: "jvm.buffer_pool.direct.count",
metricLevel: "NORMAL",
metricType: "GAUGE",
tags: {}
}
...
],
system: [
{
interval: 5,
metric: "system.context_switches",
metricLevel: "MAJOR",
metricType: "GAUGE",
tags: {}
},
{
interval: 5,
metric: "system.cpu.guest",
metricLevel: "MAJOR",
metricType: "GAUGE",
tags: {}
}
...
],
nginx: [
{
interval: 5,
metric: "middleware.nginx.conn.accepted",
metricLevel: "MAJOR",
metricType: "GAUGE",
tags: {}
},
{
interval: 5,
metric: "middleware.nginx.conn.active",
metricLevel: "MAJOR",
metricType: "GAUGE",
tags: {}
}
...
],
tomcat: [
{
interval: 15,
metric: "middleware.tomcat.thread.busy_count",
metricLevel: "NORMAL",
metricType: "GAUGE",
tags: {}
},
{
interval: 15,
metric: "middleware.tomcat.thread.max_pool_size",
metricLevel: "NORMAL",
metricType: "GAUGE",
tags: {}
}
]
},
success: true,
message: "",
timestamp: 1548057052707
}
/metrics/$group
例如: http://localhost:8006/metrics/jvm:
{
data: [
{
interval: 15,
metric: "jvm.buffer_pool.direct.capacity",
metricLevel: "NORMAL",
metricType: "GAUGE",
tags: { },
timestamp: 1548057958220,
value: 32768
},
{
interval: 15,
metric: "jvm.buffer_pool.direct.count",
metricLevel: "NORMAL",
metricType: "GAUGE",
tags: { },
timestamp: 1548057958220,
value: 4
}
...
],
success: true,
message: "",
timestamp: 1548057958228
}
/metrics/$group/$metricName
例如: http://localhost:8006/metrics/jvm/jvm.buffer_pool.direct.count
{
data: [
{
interval: 15,
metric: "jvm.buffer_pool.direct.count",
metricLevel: "NORMAL",
metricType: "GAUGE",
tags: { },
timestamp: 1548058350794,
value: 5
}
],
success: true,
message: "",
timestamp: 1548058350795
}
http://$IP:8006/metrics/$group/$metricName?tagKey=$tagKey&tagValue=$tagValue
如果多个tag可以指定多个tagKey和tagValue
http://$IP:8006/metrics/$group/level/$level
http://$IP:8006/metrics/$group/level/$level?above=true
http://$IP:8006/metrics/$group[,$group]*
http://$IP:8006/metrics/$group[,$group]*/level/$level[,$level]*
http://$IP:8006/metrics/specific?metric=$metricName[&metric=$metricName]*
将metric=$metric&metric=$metric
放在POST BODY里面。
GET方式:http://$IP:8006/metrics/specific?metric=$metricName&zeroIgnore=true
POST方式:将zeroIgnore=true放在POST BODY里面。
zeroIgnore默认为false,当需要过滤掉统计值为0的统计项,需要置成true