集群与节点
获取集群基本信息
API 定义:
GET api/v3/brokers/
请求示例:
GET api/v3/brokers/
返回数据:
{
"code": 0,
"data": [
{
"datetime": "2019-04-29 10:56:41",
"node": "emqx@127.0.0.1",
"node_status": "Running",
"otp_release": "R21/10.3.2",
"sysdescr": "EMQ X Broker",
"uptime": "3 minutes, 59 seconds",
"version": "v3.1.0"
}
]
}
获取节点基本信息
API 定义:
GET api/v3/brokers/${node}
请求示例:
GET api/v3/brokers/emqx@127.0.0.1
返回数据:
{
"code": 0,
"data": {
"datetime": "2019-04-29 10:59:59",
"node_status": "Running",
"otp_release": "R21/10.3.2",
"sysdescr": "EMQ X Broker",
"uptime": "7 minutes, 16 seconds",
"version": "v3.1.0"
}
}
获取集群监控数据
API 定义:
GET api/v3/nodes/
请求示例:
GET api/v3/nodes/
返回数据:
{
"code": 0,
"data": [
{
"connections": 2,
"load1": "2.75",
"load15": "2.87",
"load5": "2.57",
"max_fds": 7168,
"memory_total": "76.45M",
"memory_used": "59.48M",
"name": "emqx@127.0.0.1",
"node": "emqx@127.0.0.1",
"node_status": "Running",
"otp_release": "R21/10.3.2",
"process_available": 262144,
"process_used": 331,
"uptime": "1 days,18 hours, 45 minutes, 1 seconds",
"version": "v3.1.0"
}
]
}
获取节点监控数据
API 定义:
GET api/v3/nodes/${node}
请求示例:
GET api/v3/nodes/emqx@127.0.0.1
返回数据:
{
"code": 0,
"data": {
"connections": 1,
"load1": "2.75",
"load15": "2.87",
"load5": "2.57",
"max_fds": 7168,
"memory_total": 80162816,
"memory_used": 62254160,
"name": "emqx@127.0.0.1",
"node_status": "Running",
"otp_release": "R21/10.3.2",
"process_available": 262144,
"process_used": 331,
"uptime": "1 days,18 hours, 45 minutes, 1 seconds",
"version": "v3.1.0"
}
}