EMQX Broker Stats
emqx_broker_statsRetrieve live cluster counters for online devices and subscriptions in one call, avoiding expensive client listing.
Instructions
Live counters for the whole cluster.
Answers "how many devices are online" and "how many subscriptions exist" in one call — cheaper than listing clients.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "emqx_broker_stats"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| topics | Yes | Distinct routed topics. | |
| retained | No | Retained messages held by the broker. | |
| sessions | Yes | Sessions held, including offline ones. | |
| connections | Yes | Currently connected MQTT clients. | |
| subscriptions | Yes | Active subscriptions across the cluster. |