vLLM Metrics Monitor (vmm) is a lightweight dashboard that scrapes Prometheus metrics from vLLM, persists to SQLite, and serves a real-time web UI. Zero external dependencies — pure Python standard library.
🚀 Quick Start
# Install with uv
uv tool install vllm-metrics-monitor
# Or install with pip: `pip install vllm-metrics-monitor`
# Launch dashboard
vmm http://your-vllm:8000/metrics
Open http://localhost:8080 — that's it.
📖 Usage
vmm [URL] [OPTIONS]
Positional:
URL vLLM Prometheus metrics endpoint
(default: http://localhost:8000/metrics)
Options:
-p, --port PORT Dashboard HTTP port (default: 8080)
-i, --interval SEC Scrape interval in seconds (default: 3)
--retention HOURS Data retention period (default: 720, i.e. 30 days)
--db PATH SQLite database path (default: ~/.vmm/data.db)
--reset Delete existing database and start fresh
--debug Enable debug logging
Examples
vmm http://vllm-server:8000/metrics -p 9090 -i 5
vmm http://vllm-server:8000/metrics --reset
vmm http://vllm-server:8000/metrics --retention 72 --db /data/vmm.db
Docker
# Build
docker build -t vmm .
# Run
docker run -d --network host vmm http://localhost:8000/metrics
# Or use docker compose
METRICS_URL=http://192.168.1.100:8000/metrics docker compose up -d
🏗️ Architecture
graph LR
A[vLLM /metrics] -->|scrape every 3s| B[vmm]
B --> C[Scraper Thread]
C --> D[(SQLite<br/>~/.vmm/data.db)]
B --> E[HTTP Server]
E -->|JSON API| F[Browser<br/>Chart.js Dashboard]
📈 Monitored Metrics
| Metric | Source | Type |
|---|---|---|
| Running Requests | vllm:num_requests_running |
Gauge |
| Waiting Requests | vllm:num_requests_waiting |
Gauge |
| KV Cache Usage | vllm:kv_cache_usage_perc |
Gauge |
| Cache Hit Rate | prompt_tokens_cached / prompt_tokens |
Derived |
| Requests/s | vllm:request_success_total delta |
Counter rate |
| Output Tokens/s | vllm:generation_tokens_total delta |
Counter rate |
| Input Tokens/s | vllm:prompt_tokens_total delta |
Counter rate |
| TTFT | time_to_first_token_seconds |
Histogram avg |
| ITL | inter_token_latency_seconds |
Histogram avg |
| E2E Latency | e2e_request_latency_seconds |
Histogram avg |
| Uptime | process_start_time_seconds |
Gauge |
License
MIT
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
vllm_metrics_monitor-0.3.1.tar.gz
(153.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vllm_metrics_monitor-0.3.1.tar.gz.
File metadata
- Download URL: vllm_metrics_monitor-0.3.1.tar.gz
- Upload date:
- Size: 153.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3c3df04eed1462e00b493c6fefc755a57b7d0d34f668494583448e60f6451acd
|
|
| MD5 |
b14a2650cbc10c7909371c2586fd1b1c
|
|
| BLAKE2b-256 |
ca5f565eefe5fd954cb5bc54ef4d935d8ac2d944ec25dd3e548f63d7afd1a88a
|
File details
Details for the file vllm_metrics_monitor-0.3.1-py3-none-any.whl.
File metadata
- Download URL: vllm_metrics_monitor-0.3.1-py3-none-any.whl
- Upload date:
- Size: 31.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4872a60527a5cb702feb68e991a1df87dc6e42ae6b945a08e27356fc0421e230
|
|
| MD5 |
305742cff2ee3fd183bc838210cc82b2
|
|
| BLAKE2b-256 |
64f6d15f5aec8f333d7c52437cdf28f91bf2793f9d45d0e5b7f7c19e42c289e8
|