KubeMQ
OperateObservabilityManagement API

Health & System Endpoints

Liveness and readiness probes, billing, and the metrics endpoint on KubeMQ's management API, with a Kubernetes probe example.

These operational endpoints cover health checks, readiness, billing, and Prometheus metrics on the management API port (:8080). They are not gated by the readiness guard described on the Management API overview, so they are available as soon as the HTTP server starts.

GET /health

Returns the process health as plain text. This is the liveness signal.

Response: text/plain

ConditionHTTP statusBody
Healthy200healthy
Not healthy500not healthy
GET /health
→ 200 OK
healthy

Use this for a liveness probe or a health-indicator badge; poll every 5–10 seconds.

GET /ready

Returns the readiness state as a raw JSON HealthState object (no envelope). This is the Kubernetes readiness probe endpoint.

Response: application/json

ConditionHTTP statusBody
Ready200HealthState JSON
Not ready500HealthState JSON
{
  "is_healthy": true,
  "is_ready": true,
  "current_leadership_role": "leader"
}
FieldTypeDescription
is_healthybooleanWhether the process is healthy
is_readybooleanWhether the node is ready to accept traffic
current_leadership_rolestringThe cluster leadership role: leader, follower, or empty for a standalone node

Use this for a readiness probe and to display each node's cluster leadership role.

Kubernetes probes

Wire /health and /ready to the container's liveness and readiness probes on the management API port (8080):

livenessProbe:
  httpGet:
    path: /health
    port: 8080
  initialDelaySeconds: 10
  periodSeconds: 10
readinessProbe:
  httpGet:
    path: /ready
    port: 8080
  initialDelaySeconds: 5
  periodSeconds: 5

For full deployment settings, see Kubernetes configuration.

GET /billing

Returns a usage summary for the current node, wrapped in the standard response envelope.

Response: standard envelope with Billing data.

FieldTypeDescription
hostnamestringNode hostname
uptimefloat64Uptime in seconds
messagesint64Total messages processed
volumefloat64Total data volume in bytes
last_messageint64Unix timestamp of the last message
{
  "error": false,
  "error_string": "",
  "data": {
    "hostname": "kubemq-node-0",
    "uptime": 3600,
    "messages": 50000,
    "volume": 1024000,
    "last_message": 1709312400
  }
}

GET /metrics

Returns all registered metrics in Prometheus text exposition format. This is the endpoint Prometheus scrapes; it is not meant for direct UI consumption — use the snapshot endpoints for dashboard data instead.

Response: text/plain (Prometheus exposition format)

For the full metric catalog, labels, and PromQL examples, see Prometheus Metrics.

GET /kill

Disabled. Always returns HTTP 404 in plain text and does not use the standard envelope. Reserved — do not use.

GET /kill
→ 404 Not Found
{"message":"not found"}

Was this page helpful?

On this page