KubeMQ
OperateObservabilityManagement API

Stats Endpoints

Read-only statistics endpoints for queues, channels, clients, and events stores on the KubeMQ management API.

The statistics endpoints under /v1/stats/ return raw metrics for queues, events stores, channels, and clients. All responses use the standard response envelope (see the Management API overview) and are gzip-compressed.

For dashboards, prefer the pre-aggregated snapshot endpoints — they return ready-to-render DTOs rather than raw, compressed statistics.

GET /v1/stats/queues

Returns queue storage statistics from the persistence engine.

Response data — Queues:

{
  "now": "2024-03-01T12:00:00Z",
  "total_queues": 5,
  "sent": 10000,
  "waiting": 250,
  "delivered": 9750,
  "queues": [
    {
      "name": "orders.process",
      "messages": 500,
      "bytes": 102400,
      "first_sequence": 1,
      "last_sequence": 500,
      "sent": 500,
      "subscribers": 2,
      "waiting": 50,
      "delivered": 450
    }
  ]
}
FieldTypeDescription
nowstring (RFC3339)Server timestamp
total_queuesintTotal number of queue channels
sentint64Total messages sent across all queues
waitingint64Total messages waiting across all queues
deliveredint64Total messages delivered across all queues
queuesQueue[]Per-queue detail array

Each entry in queues is a Queue:

FieldTypeDescription
namestringQueue channel name
messagesint64Total stored messages
bytesint64Total stored bytes
first_sequenceint64First message sequence number
last_sequenceint64Last message sequence number
sentint64Messages sent to this queue
subscribersintActive subscriber count
waitingint64Messages waiting for delivery
deliveredint64Messages delivered from this queue

GET /v1/stats/events_stores

Returns events store statistics from the persistence engine. Events stores are backed by the same persistence layer as queues, so this endpoint returns the same Queues schema as GET /v1/stats/queues.

GET /v1/stats/channels

Returns all channel statistics with a per-type summary.

Response data — ChannelsResponse:

{
  "Host": "kubemq-node-0",
  "LastUpdate": "2024-03-01T12:00:00Z",
  "Channels": [
    {
      "kind": "queues",
      "name": "orders.process",
      "total_messages": 5000,
      "total_volume": 1024000,
      "total_errors": 0
    },
    {
      "kind": "events",
      "name": "notifications",
      "total_messages": 12000,
      "total_volume": 240000,
      "total_errors": 5
    }
  ],
  "Summery": [
    {
      "kind": "queues",
      "total_channels": 3,
      "total_messages": 15000,
      "total_volume": 3072000,
      "total_errors": 2
    }
  ]
}
FieldTypeDescription
HoststringNode hostname
LastUpdatestring (RFC3339)Timestamp of the last metrics update
ChannelsChannelStats[]Per-channel statistics
SummeryChannelsSummery[]Per-type aggregated summary

Each entry in Channels is a ChannelStats:

FieldTypeDescription
kindstringChannel type: queues, events, events_store, commands, or queries
namestringChannel name
total_messagesfloat64Total messages through this channel
total_volumefloat64Total data volume in bytes
total_errorsfloat64Total errors on this channel

Each entry in Summery is a ChannelsSummery:

FieldTypeDescription
kindstringChannel type
total_channelsintNumber of channels of this type
total_messagesfloat64Aggregate messages
total_volumefloat64Aggregate volume
total_errorsfloat64Aggregate errors

GET /v1/stats/clients

Returns all connected client statistics with aggregated totals.

Response data — ClientResponse:

{
  "Host": "kubemq-node-0",
  "LastUpdate": "2024-03-01T12:00:00Z",
  "TotalClients": 12,
  "TotalMessages": 50000,
  "TotalVolume": 10240000,
  "TotalErrors": 5,
  "TotalOnline": 8,
  "Clients": [
    {
      "name": "order-service-1",
      "total_messages": 5000,
      "total_volume": 1024000,
      "total_errors": 0,
      "total_pending": 10
    }
  ]
}
FieldTypeDescription
HoststringNode hostname
LastUpdatestring (RFC3339)Timestamp of the last metrics update
TotalClientsintTotal unique clients
TotalMessagesfloat64Sum of all client messages
TotalVolumefloat64Sum of all client volume
TotalErrorsfloat64Sum of all client errors
TotalOnlineintCurrently connected clients
ClientsClientsStats[]Per-client statistics

Each entry in Clients is a ClientsStats:

FieldTypeDescription
namestringClient identifier
total_messagesfloat64Total messages for this client
total_volumefloat64Total volume in bytes
total_errorsfloat64Total errors
total_pendingfloat64Pending messages

GET /v1/stats/attach

A WebSocket endpoint for real-time monitoring. It is an alias for /api/monitor, mounted under the stats group, and takes the same query parameters. See WebSocket Protocols for the monitor protocol and transport frames.

Was this page helpful?

On this page