KubeMQ
OperateObservabilityManagement API

Dashboard Endpoints

Pre-aggregated snapshot endpoints that power the KubeMQ dashboard — single-node and cluster snapshots plus time-bucketed activity.

These endpoints power the built-in dashboard. They return pre-aggregated, UI-ready data structures with humanized values — formatted numbers, relative timestamps, and percentages alongside the raw values. They all live under /api/ on the management API port (:8080), use the standard response envelope, and are gated by the readiness check.

The snapshot payloads contain many nested DTOs. This page documents the top-level shape of each response; for the full field-by-field schema of every nested type, see Data Models.

Poll, don't hammer

The server recomputes the snapshot internally every 5 seconds. Polling faster than that returns the same data — poll the snapshot endpoints every 5–10 seconds. For a push-based stream instead of polling, use the /api/connection WebSocket.

GET /api/snapshot

Returns the current single-node snapshot — everything needed to render the dashboard for one KubeMQ node: host info, topology, stat cards, per-channel detail, and per-client detail. The response data is a SnapshotDTO.

{
  "error": false,
  "error_string": "",
  "data": {
    "hostsInfo": [
      {
        "host": "kubemq-node-0",
        "version": "2.5.0",
        "status": "Running",
        "role": "Leader",
        "uptime": "24h0m0s",
        "activeClients": 8
      }
    ],
    "topologyNodes": {
      "clusterNodesList": ["kubemq-node-0", "kubemq-node-1"],
      "clientNodesList": ["order-service", "payment-service"],
      "clusterClientConnections": [
        { "clusterNode": 0, "clientNode": 0 },
        { "clusterNode": 0, "clientNode": 1 }
      ]
    },
    "trafficChannels": {
      "channels": {
        "queues/orders": [
          { "clientId": "order-service", "side": "send" },
          { "clientId": "payment-service", "side": "receive" }
        ]
      }
    },
    "statsCards": { "...": "StatCardDTOs" },
    "topChannels": [
      {
        "type": "Queue",
        "channel": "orders.process",
        "lastActivity": "2 seconds ago",
        "sent": "5,000/4.9 MB",
        "delivered": "4,800/4.7 MB",
        "clients": "3/5"
      }
    ],
    "lastActivity": 1709312400000,
    "lastActivityHuman": "2 seconds ago",
    "total": { "...": "BaseValuesDTO" },
    "incoming": { "...": "BaseValuesDTO" },
    "outgoing": { "...": "BaseValuesDTO" },
    "channels": 10,
    "clients": 8,
    "activeChannels": 5,
    "queues": { "...": "FamilyDTO" },
    "pubsub": { "...": "FamilyDTO" },
    "commandsQueries": { "...": "FamilyDTO" },
    "nodeType": "standalone",
    "node": "kubemq-node-0"
  }
}

Top-level fields

FieldTypeDescription
hostsInfoHostInfoDTO[]System info for each node — memory, CPU, storage, uptime, role, active clients.
topologyNodesTopologyNodesDTOCluster-to-client connection graph for the topology visualization.
trafficChannelsTrafficChannelsDTOPer-channel client connections with the send/receive side.
statsCardsStatCardDTOsPre-computed overview cards (channels, clients, incoming, outgoing).
topChannelsTopChannelDTO[]The 10 most recently active channels.
lastActivityint64Unix timestamp (ms) of the last activity across all channels.
lastActivityHumanstringHuman-readable relative time (e.g. "2 seconds ago").
totalBaseValuesDTOCombined incoming + outgoing totals.
incomingBaseValuesDTOAggregate incoming metrics.
outgoingBaseValuesDTOAggregate outgoing metrics.
channelsint64Total channel count.
clientsint64Total client count.
activeChannelsint64Number of currently active channels.
queuesFamilyDTOThe Queues family — full per-channel and per-client detail.
pubsubFamilyDTOThe Pub/Sub family (Events + Events Store combined).
commandsQueriesFamilyDTOThe CQRS family (Commands + Queries combined).
nodeTypestringNode type from configuration.
nodestringNode hostname.

Use statsCards for the overview cards, topChannels for the recent-activity table, hostsInfo for node health, topologyNodes for the cluster graph, and the three FamilyDTO objects (queues, pubsub, commandsQueries) for the detailed channel and client views. Each humanized value has a raw counterpart (e.g. lastActivity / lastActivityHuman); see Data Models for the complete nested schemas.

GET /api/cluster-snapshot

Returns the cluster-wide aggregated snapshot. In a multi-node cluster this merges data from every node; in standalone mode it is equivalent to /api/snapshot.

The response uses the same SnapshotDTO schema as /api/snapshot, with data aggregated across all cluster nodes:

  • hostsInfo contains one entry per node.
  • Channel and client entities are combined across nodes.
  • Queue waiting counts reflect the cluster total.

Use this endpoint for the cluster-wide dashboard view.

GET /api/last-diff

Returns time-bucketed channel activity — historical time-series data showing how each channel's metrics changed over a set of time windows. This is the data behind the dashboard's sparklines and activity charts.

The response data is a channel-first nested map:

map[channel]            → channel key, format "{type}/{name}"
  map[resolution]       → resolution key, e.g. "1h", "7d"
    TimeBucket
      resolution        → resolution identifier
      items[]           → data points (up to 30 per resolution)
{
  "error": false,
  "error_string": "",
  "data": {
    "queues/orders": {
      "1h": {
        "resolution": "1h",
        "items": [
          {
            "timestamp": "2024-03-01T11:00:00Z",
            "inMessages": 100,
            "inVolume": 20480,
            "outMessages": 95,
            "outVolume": 19456
          },
          {
            "timestamp": "2024-03-01T11:02:00Z",
            "inMessages": 50,
            "inVolume": 10240,
            "outMessages": 48,
            "outVolume": 9830
          }
        ]
      },
      "1d": {
        "resolution": "1d",
        "items": [
          {
            "timestamp": "2024-03-01T00:00:00Z",
            "inMessages": 5000,
            "inVolume": 1024000,
            "outMessages": 4800,
            "outVolume": 983040
          }
        ]
      }
    }
  }
}

TimeBucket

FieldTypeDescription
resolutionstringResolution identifier (see the table below).
itemsTimeBucketItem[]Up to 30 data points, zero-padded if fewer points exist.

TimeBucketItem

FieldTypeDescription
timestampstring (RFC3339)Start of the time bucket.
inMessagesint64Incoming message-count delta for the bucket.
inVolumeint64Incoming volume delta (bytes).
outMessagesint64Outgoing message-count delta.
outVolumeint64Outgoing volume delta (bytes).

Resolutions

Every channel carries data at all eight resolutions; each resolution holds up to 30 data points covering its window.

ResolutionTime rangePoint interval
1hLast 1 hour2 minutes
2hLast 2 hours4 minutes
6hLast 6 hours12 minutes
12hLast 12 hours24 minutes
1dLast 24 hours48 minutes
7dLast 7 days5.6 hours
14dLast 14 days11.2 hours
30dLast 30 days24 hours

To render a sparkline for a channel, look up its key (e.g. "queues/orders"), pick a resolution, and plot the items array.

GET /api/agents

Returns the registered AI agents as a paginated list. This is one of the AI-dashboard endpoints behind the dashboard's agents area; see the Prometheus metrics page for the agent-platform metric series.

Query parameters

ParameterTypeDefaultDescription
offsetint0Zero-based index of the first agent to return.
limitint50Maximum agents to return. Capped at 100 — larger values are clamped.
curl "http://localhost:8080/api/agents?offset=0&limit=50"

The response uses the standard envelope; data is the paginated list of registered agents with their presence and lifetime stats.

GET /api/agents/:id

Returns the detail for a single registered agent, identified by the :id path parameter. The response data carries the agent's record plus a stats snapshot — lifetime request, error, and latency totals along with per-method and per-outcome breakdowns.

curl "http://localhost:8080/api/agents/order-router"

Like the list endpoint, the agent detail uses the standard envelope.

Was this page helpful?

On this page