Supervisor API
Canonical reference: docs/api-reference.md (generated endpoint directory) — this page is a task-oriented summary.
Introspect the Erlang/OTP supervisor tree at runtime. View child processes, their states, and restart counts for debugging and operations.
Overview
The supervisor tree is the backbone of ZERG’s fault tolerance. This API exposes the runtime supervision hierarchy, allowing operators to inspect which supervisors are running, their child specifications, restart strategies, and process states without accessing the Erlang shell.
Authentication
Requires Authorization: Bearer <token> with the metrics:read
permission (admins pass via "*").
Endpoints
Supervisor Tree
GET /api/v1/supervisor/tree
Returns the recursive tree rooted at the fixed top-level supervisor sol_sup (no :name parameter). Each node carries child counts; each child entry carries its id, pid, type, and modules.
Response:
{
"name": "sol_sup",
"specs": 12,
"active": 12,
"children": [
{
"id": "sol_zmq_gateway",
"pid": "<0.123.0>",
"type": "worker",
"modules": ["sol_zmq_gateway"]
},
{
"id": "sol_owners_sup",
"pid": "<0.100.0>",
"type": "supervisor",
"modules": ["sol_owners_sup"]
}
]
}
pid may be a pid string, "restarting", or "undefined".
List Supervisor Children
GET /api/v1/supervisor/children/:name
Returns the direct children of a named supervisor (e.g., sol_sup, sol_infra_sup, sol_owners_sup).
Response:
{
"name": "sol_sup",
"children": [
{
"id": "sol_zmq_gateway",
"pid": "<0.123.0>",
"type": "worker",
"modules": ["sol_zmq_gateway"]
}
]
}
404 if the supervisor name does not resolve to a registered atom.
Available Supervisors:
| Name | Strategy | Purpose |
|---|---|---|
sol_sup | rest_for_one | Top-level supervisor |
sol_infra_sup | one_for_one | Infrastructure (compactor, autoscaler) |
sol_owners_sup | one_for_one | ETS heir owners (32 owner processes, machine-derived count) |
sol_zmq_pipeline_sup | simple_one_for_one | ZMQ pipeline workers |
sol_inference_sup | simple_one_for_one | llama.cpp inference instances |
sol_workflow_sup | simple_one_for_one | Workflow instances |
Error Codes:
| Code | Description |
|---|---|
| 401 | Authentication required |
| 403 | metrics:read permission required |
| 404 | Supervisor not found |
Examples:
curl http://127.0.0.1:21434/api/v1/supervisor/tree \
-H "Authorization: Bearer $TOKEN"
curl http://127.0.0.1:21434/api/v1/supervisor/children/sol_infra_sup \
-H "Authorization: Bearer $TOKEN"