Skip to content

Diagnostics ​

Settings → Diagnostics shows the state of every part of the running workstation, read from it when the page opens or on Check again. Nothing is cached or guessed: each check asks the component itself. Copy report puts the whole report on the clipboard as JSON, ready to paste into a bug report.

CheckWhat it readsStates
DatabaseA query against the databaseok, failing when it does not answer
Schema migrationsThe migration the database is at, against the newest one the code shipsok, failing when the database is behind (run the migrations), warning when the scripts cannot be read
File storageA small file written to the storage root and removedok, failing when it cannot be written
Disk spaceFree and total space on the storage diskok, warning under 1 GiB or 5% free
Scan workersWorkers alive against those configured, scans queued and runningok, failing when a worker stopped
Background tasksThe Agent Bridge sweeper and the task that removes a deleted vault's filesok, failing when one stopped
Proxy listenerWhether the proxy listens, and its last errorok, off when stopped on purpose, failing on an error

The overall state is the worst check; a stopped proxy does not count.

The same report is served at GET /api/v1/system/diagnostics. It names local paths and the platform, so it is for the user only: a request that comes through an agent transport (a bearer token or MCP headers) is refused. Agents read system_info instead. GET /api/v1/system/health stays a plain liveness probe for the launcher and Docker.

Metrics ​

GET /api/v1/system/metrics serves Prometheus metrics: build, uptime, scan workers and queue, whether the proxy listens, open findings by severity, webhook deliveries by status and audit rows waiting for their seal. Totals only, nothing about hosts or content. When an access token is set, the endpoint asks for it like the rest of the API:

yaml
scrape_configs:
  - job_name: phantom
    metrics_path: /api/v1/system/metrics
    authorization:
      credentials: <the access token>
    static_configs:
      - targets: ['127.0.0.1:8000']

Tracing ​

Each API request runs in a W3C Trace Context trace. When a client sends a traceparent header, Phantom continues that trace with a span of its own; otherwise it starts a new one. Every response carries the traceparent of Phantom's span and a Server-Timing header with the time it took, and every log line written during the request shows the trace ID in brackets, so a request can be followed from the client into Phantom's log. Requests slower than TRACE_SLOW_MS (2000 by default) are logged with their method, path, status and duration. Traffic Phantom sends to targets never gets a trace header.