View on GitHub

Read about the commits

# VitalSVG


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

![plex status](https://your-host/badge/docker/plex/status.svg)
![plex cpu](https://your-host/badge/docker/plex/cpu.svg)
![plex ram](https://your-host/badge/docker/plex/ram.svg)
![plex uptime](https://your-host/badge/docker/plex/uptime.svg)
![plex cpu trend](https://your-host/badge/docker/plex/sparkline.svg?metric=cpu)

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).

🔒 This site's search assistant runs a local AI model in your browser — no cloud AI, no tracking. See the ℹ️ in the chat panel for details.