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
| Condition | HTTP status | Body |
|---|---|---|
| Healthy | 200 | healthy |
| Not healthy | 500 | not healthy |
GET /health
→ 200 OK
healthyUse 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
| Condition | HTTP status | Body |
|---|---|---|
| Ready | 200 | HealthState JSON |
| Not ready | 500 | HealthState JSON |
{
"is_healthy": true,
"is_ready": true,
"current_leadership_role": "leader"
}| Field | Type | Description |
|---|---|---|
is_healthy | boolean | Whether the process is healthy |
is_ready | boolean | Whether the node is ready to accept traffic |
current_leadership_role | string | The 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: 5For 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.
| Field | Type | Description |
|---|---|---|
hostname | string | Node hostname |
uptime | float64 | Uptime in seconds |
messages | int64 | Total messages processed |
volume | float64 | Total data volume in bytes |
last_message | int64 | Unix 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?