Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

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:

NameStrategyPurpose
sol_suprest_for_oneTop-level supervisor
sol_infra_supone_for_oneInfrastructure (compactor, autoscaler)
sol_owners_supone_for_oneETS heir owners (32 owner processes, machine-derived count)
sol_zmq_pipeline_supsimple_one_for_oneZMQ pipeline workers
sol_inference_supsimple_one_for_onellama.cpp inference instances
sol_workflow_supsimple_one_for_oneWorkflow instances

Error Codes:

CodeDescription
401Authentication required
403metrics:read permission required
404Supervisor 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"