连接会话统计
获取集群连接会话统计
API 定义:
GET api/v3/stats/
请求示例:
GET api/v3/stats/
返回数据:
{
"code": 0,
"data": [
{
"node": "emqx@127.0.0.1",
"subscriptions/shared/max": 0,
"subscriptions/max": 2,
"subscribers/max": 2,
"topics/count": 0,
"subscriptions/count": 0,
"topics/max": 1,
"sessions/persistent/max": 2,
"connections/max": 2,
"subscriptions/shared/count": 0,
"sessions/persistent/count": 0,
"retained/count": 3,
"routes/count": 0,
"sessions/count": 0,
"retained/max": 3,
"sessions/max": 2,
"routes/max": 1,
"subscribers/count": 0,
"connections/count": 0
}
]
}
获取节点连接会话统计
API 定义:
GET api/v3/nodes/${node}/stats/
请求示例:
GET api/v3/nodes/emqx@127.0.0.1/stats/
返回数据:
{
"code": 0,
"data": {
"subscriptions/shared/max": 0,
"subscriptions/max": 2,
"subscribers/max": 2,
"topics/count": 0,
"subscriptions/count": 0,
"topics/max": 1,
"sessions/persistent/max": 2,
"connections/max": 2,
"subscriptions/shared/count": 0,
"sessions/persistent/count": 0,
"retained/count": 3,
"routes/count": 0,
"sessions/count": 0,
"retained/max": 3,
"sessions/max": 2,
"routes/max": 1,
"subscribers/count": 0,
"connections/count": 0
}
}