# VitalSVG
Live SVG badges for your infrastructure. Like github-readme-stats, but for your actual servers.





Polls Docker and Proxmox APIs, stores 24h of metrics in SQLite, renders cache-friendly SVG badges you can embed anywhere.
- Health-aware colors โ green/yellow/red based on status and resource usage
- Sparkline charts โ tiny inline trend graphs for CPU and RAM
- Zero-config embeds โ just an
<img>tag, no JS or auth needed - Web UI โ auto-discovers containers at
http://localhost:8080/with copy-paste badge URLs - Single binary โ no runtime dependencies, SVG templates embedded
# Quick Start
docker compose up -d
Or run directly:
go build .
./vitalsvg
Open http://localhost:8080 for the dashboard.
# Configuration
Copy config.yaml.example to config.yaml, or use environment variables:
| Variable | Default | Description |
|---|---|---|
VITALSVG_PORT |
8080 |
Server port |
VITALSVG_POLL_INTERVAL |
30s |
How often to poll sources |
VITALSVG_DOCKER_SOCKET |
/var/run/docker.sock |
Docker socket path |
VITALSVG_PROXMOX_HOST |
โ | Proxmox host:port (enables Proxmox) |
VITALSVG_PROXMOX_TOKEN_ID |
โ | API token ID (user@realm!name) |
VITALSVG_PROXMOX_TOKEN_SECRET |
โ | API token secret |
VITALSVG_PROXMOX_SKIP_TLS |
false |
Skip TLS verification |
# Badge Endpoints
GET /badge/{source}/{name}/status.svg
GET /badge/{source}/{name}/cpu.svg
GET /badge/{source}/{name}/ram.svg
GET /badge/{source}/{name}/uptime.svg
GET /badge/{source}/{name}/sparkline.svg?metric=cpu
GET /badge/{source}/{name}/sparkline.svg?metric=ram
source is docker or proxmox. name is the container/VM name.
# Master overview
GET /badge/master.svg # all sources
GET /badge/{source}/master.svg # one source
A single SVG with every resource: status, uptime, CPU and RAM (with inline sparklines).
# Theming
The master badge is themeable via query params:
GET /badge/master.svg?theme=nord
GET /badge/master.svg?bg=0d1117&text=c9d1d9&muted=8b949e
themeโ preset:dark(default),light,dracula,nord,solarized,rosepine- Per-color overrides (3- or 6-digit hex,
#optional):bg,header,rowalt,border,text,muted
Overrides apply on top of the chosen preset; invalid values are ignored. Status/CPU/RAM colors stay semantic (green/yellow/red by threshold).