DurinDoor
Guides

Monitoring usage

Read request history, console output, and the health endpoint after traffic flows.

Send a few requests, then open Dashboard → Usage (/dashboard/usage), the dashboard home. The overview starts with gateway, 24-hour activity, latency, and storage monitoring cards, plus in-flight requests and provider health. These refresh every 15 seconds independently of the usage period, with pause and manual refresh controls. The former /dashboard/monitoring URL redirects here. Usage statistics follow: request counts, input and output tokens, cached tokens, estimated cost, and output speed, with charts, grouped rows, and provider topology.

The Storage card currently labels its type as SQLite even when PostgreSQL is active. Check Settings → Database for the active engine rather than using that label to identify the history store.

Combo/account attribution is under Dashboard → Combos → Connection usage, covering the last seven days. API key limits and consumption are below the key list on Dashboard → API Keys; see API key limits. Neither block remains on Usage.

Use Overview for totals and trends, and Details to investigate one request.

Inspect a request

  1. Select the time period. Presets include today, 24 hours, 7 to 365 days, and all history.
  2. Open Details and filter by provider or local date-time range.
  3. Open the request row. Check the provider, model, account, key, status, tokens, latency, and time to first token.
  4. Use Copy all to copy the redacted detail JSON when reporting a problem.

Custom calendar ranges show totals but omit the preset-only chart. Request details contain payload metadata such as presence, type, and byte length, rather than stored request and response bodies. The JSON tree displays the same detail row.

A streaming request can begin with HTTP 200 and later fail. Such failures are recorded as errors. Check completion and error events in the client instead of interpreting HTTP 200 alone as success.

Read costs and speed

Overview groups usage by provider, model, account, key, or endpoint. Costs are estimates based on configured pricing. The provider's bill remains authoritative.

Costs can be split into fresh input, cached reads, cache writes, visible output, and reasoning. Older rows or provider-reported totals can appear under Not split when the individual amounts cannot be reconstructed. The categories plus Not split equal the total.

Output speed excludes the time to first token when timing is available. Non-streaming calls use their full duration in aggregate speed calculations. Rows without timing still count toward tokens and cost but are excluded from speed. Per-request speed and the final stream's tokens_per_second field are omitted when first-token timing is unknown.

Cache-hit percentage and output speed on detail rows are calculated from recorded tokens and timing. They are not separate provider measurements.

Console log

Open Console Log to inspect recent server messages. Filter by level, tag, or text; pause updates, copy or download visible lines, or clear the buffer. The in-memory 2000-line buffer disappears on restart and is separate from persistent usage history.

Check HTTP health

curl http://localhost:20128/api/health

{ "ok": true } means the HTTP server answered. This public endpoint does not require a client key and does not check provider credentials. List models and send a first request to verify provider access.

Keep or remove history

Usage lives in the gateway database. For the default SQLite engine, the file is DATA_DIR/db/data.sqlite. Default DATA_DIR is ~/.9router on macOS and Linux, or %APPDATA%\9router on Windows. The legacy usage.json is an import source, not the live history store.

Retention is off by default. See Usage and quota to configure cleanup or download a backup. There is no usage CSV export.

Reset on Overview deletes rows in the selected period. That deletion cannot be undone. Back up the database before removing history you need for analysis or budgets. If recent requests are missing, verify the time filter, retention settings, and that the client reached this instance.

On this page

Edit on GitHub