Skip to content

Web Dashboard

vminfo --web starts a lightweight, read-only HTTP API and dashboard.

Start the server

bash
vminfo --web

Default address:

text
http://127.0.0.1:20021

Custom address:

bash
vminfo --web --bind 0.0.0.0 --port 8080 --interval 1s

You can also launch the TUI alongside the dashboard:

bash
vminfo --web --tui

Authentication

By default, the dashboard and API are local and unauthenticated.

When --token is enabled:

bash
vminfo --web --token
vminfo --web --token my-secret
  • bare --token auto-generates a URL-safe token
  • --token my-secret uses a fixed token
  • the first successful /?token=... visit sets a cookie for later requests
  • /healthz remains public for local probes
  • /, /api/v1/*, and /ws require the token or auth cookie
  • token-protected mode does not expose permissive Access-Control-Allow-Origin: *
  • WebSocket upgrades require the browser origin to match the dashboard host

Remote access

When binding to 0.0.0.0, enable --token unless the dashboard is only exposed to a trusted private network.

Endpoints

EndpointPurpose
GET /healthzPublic health check
GET /api/v1/snapshotFull runtime snapshot
GET /api/v1/cpuCPU data
GET /api/v1/memoryMemory and swap data
GET /api/v1/diskFilesystem and disk I/O data
GET /api/v1/networkNetwork totals and interface data
GET /api/v1/processesProcess list
GET /api/v1/systemHost metadata
GET /api/v1/healthHealth score and warnings
GET /wsLive snapshot stream

See the full HTTP API reference for payload examples and query parameters.

最近更新

Released under the MIT License.