v7

latestOpenAPI 3.1.0Apache-2.0raw.githubusercontent.com2026-08-01103129.3 KB
Admin

Broker statistics

Returns all broker counters in one call. Every field is an atomic load — zero allocation, zero contention. Raw cumulative counters are exposed; clients compute rates by polling.

get/api/v1/stats

Response

Current broker statistics

uptime_secondsnumber double

Broker uptime in seconds

Example response

{
  "uptime_seconds": 86400.5,
  "connections": {
    "current": 342,
    "total": 15000,
    "disconnections": 14658
  },
  "messages": {
    "received": 1250000,
    "sent": 980000
  },
  "bytes": {
    "received": 524288000,
    "sent": 412000000
  },
  "errors": {
    "protocol": 12
  },
  "by_protocol": {
    "mqtt": {
      "connections": {
        "current": 342,
        "total": 15000,
        "disconnections": 14658
      },
      "messages": {
        "received": 1100000,
        "sent": 850000,
        "publish_received": 1000000,
        "publish_sent": 800000
      },
      "bytes": {
        "received": 524288000,
        "sent": 412000000
      },
      "subscriptions": {
        "active": 1200,
        "retained_messages": 45
      },
      "errors": {
        "protocol": 12,
        "auth": 5,
        "authz": 3,
        "packet": 8
      }
    },
    "amqp": {
      "connections": {
        "current": 342,
        "total": 15000,
        "disconnections": 14658
      },
      "messages": {
        "received": 1250000,
        "sent": 980000
      },
      "bytes": {
        "received": 524288000,
        "sent": 412000000
      },
      "channels": 42,
      "consumers": 15,
      "errors": {
        "protocol": 12
      }
    }
  }
}
All 10 operations