This commit is contained in:
Mateusz Gruszczyński committed 2026-11-14 17:24:12 +01:00
1 parent 78dbb31487
commit f48843e934
83 files changed
+7304 -1203

No files matched your search

+16 -3
View File
@@ -18,18 +18,31 @@ Vhost and Docker Vhost live request-rate charts use a **recent-traffic adaptive
Overview allows account-specific card layout and history controls; see [Dashboard](DASHBOARD.md). GeoIP/country analytics depend on the installed/update database and whether country capture is enabled.
**Settings → System information** shows the operating-system/hardware snapshot and **Statistics source**. The old dedicated process-information block is no longer displayed there; this is a panel presentation change only. Process CPU/RAM and related measurements continue to be available in the Overview and authenticated metrics APIs where supported. **Settings → Appearance → Data refresh** stores the per-account refresh intervals; switching off automatic refresh does not disable manual refresh.
### System information
**Settings → System information** is a read-only diagnostic page built from `GET /api/system-info`:
| Block | Contents |
|---|---|
| Host card | Operating system as the title, environment (for example Docker), architecture, kernel, logical CPUs, RAM, swap, host uptime and RustProxy uptime. **LIVE** / **MANUAL** shows whether automatic refresh is on; **Copy diagnostics** copies a plain-text report (host, process, budgets, network, certificate tools, paths) for bug reports, and **Refresh now** fetches a new sample. |
| Tiles | System CPU and RustProxy CPU with short history lines, load average (1/5/15 min against the number of CPUs), RAM used/total with the RustProxy share, and file descriptors/limit with the OS thread count. |
| RustProxy process | Resident memory (RSS) split into HOT cache, transient cache buffers, anonymous and file-backed memory; HOT/transient/transform budgets with usage bars; process start, virtual memory, swap, disk read/written and the cgroup limit. |
| Network | Active interfaces with RX/TX per second and totals, idle interfaces folded away, and an RX/TX history line. |
| Certificate toolchain | Python → pip → Certbot versions (green when available, red when missing), the managed/system mode and the managed environment path with **Copy**. |
| Data locations | Data directory and SQLite database path with **Copy**, and the metric sources used on this platform. |
Unavailable values are shown as N/A and never estimated. The short history lines are kept only in the open browser tab (they reuse Overview samples when available) and are not stored by RustProxy, so the page adds no server memory. **Settings → Appearance → Data refresh** stores the per-account refresh intervals; switching off automatic refresh does not disable manual refresh. Overview keeps the full process and network charts; see [Dashboard](DASHBOARD.md).
## Prometheus exporter
The exporter is **disabled by default** and uses a separate HTTP listener, normally `127.0.0.1:9191`, at `/metrics`. It is not protected by the admin browser cookie; it has its **own** client-network and bearer-token policy. In **Settings → Prometheus** enable the endpoint and configure:
The exporter is **disabled by default** and uses a separate HTTP listener, normally `127.0.0.1:9191`, at `/metrics`. It is not protected by the admin browser cookie; it has its **own** client-network and bearer-token policy. **Settings → Prometheus** is split into **Endpoint** (enable switch, bind address and path — both marked *RESTART* —, metrics path and **allowed scraper addresses** entered as IP/CIDR chips), **Prometheus bearer token** (status badge, generate/rotate, revoke, one-time token box with **Copy**, token-free trusted networks) and **Metric groups**; the generated `scrape_configs` example is collapsible. Fields without the RESTART badge apply immediately. Configure:
Use the separate **Prometheus token** controls in Settings to generate, rotate or revoke a 32+ character Bearer credential. Its clear value appears only once; copy it directly into your monitoring secrets store. The database keeps only its hash, and rotation/revocation takes effect without reprinting the previous secret. The older environment-variable credential remains supported as a fallback *only until* a generated credential or explicit revocation entry exists. Setting a new token does not reconfigure the exporter listener or its enable switch.
- `listen`, `path`, `allowed_cidrs` and an optional environment-variable **name** `bearer_token_env` (the secret value is supplied separately to the service).
- `allow_trusted_network_without_token` only for a deliberately restricted monitoring subnet. `/0` CIDRs are not accepted in this mode.
- Collector switches for process/system, Vhosts, traffic, backends, Docker, cache domains, Streams and logging.
- Collector switches for process/system, Vhosts, traffic, backends, Docker, cache domains, Streams and logging. The *Domains and effectiveness* group also exports `rust_proxy_cache_rule_matches_total{origin,vhost,rule}` — matches of [cache rules](CACHE.md#cache-rules-vcl-style) since process start.
A non-loopback exporter requires a valid generated or environment Bearer token at scrape time, or an explicit token-free trusted-network exception; otherwise requests return 401. The exporter uses plain HTTP; keep it on loopback, trusted network or a protected TLS tunnel. `Forwarded`/`X-Forwarded-For` headers cannot grant exporter access because network restrictions apply to the transport peer.