No description
- Go 67.9%
- Svelte 28.8%
- CSS 1.2%
- JavaScript 1%
- Dockerfile 0.7%
- Other 0.4%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
|
||
| cmd | ||
| internal | ||
| web | ||
| .dockerignore | ||
| .env.example | ||
| .gitignore | ||
| docker-compose.local.yml | ||
| docker-compose.yml | ||
| Dockerfile | ||
| go.mod | ||
| go.sum | ||
| LICENSE | ||
| README.md | ||
LocalMonitor ("The herd valley")
One-glance status page for TrueNAS, Proxmox, UniFi, NetBird, Syncthing, Kubernetes and misc servers. Go backend + Svelte frontend, SQLite history, all graphics rendered as SVG.
Architecture
cmd/collector: polls all sources everyPOLL_INTERVALseconds, writes to SQLite. Runs independently of the website.cmd/server: serves/api/overview,/api/history/{id}?hours=Nfrom the DB, plus the built frontend.web/: Svelte 5 + Vite. Polls the API every 15s; gauges, graphs and the peer map are SVG built in components.- Both containers share one SQLite file (WAL mode) in
DATA_DIR. Keep it on a local disk, not NFS.
Configuration
All URLs and keys live in .env (gitignored). WEB_PORT sets the public port (default 80), DATA_DIR the host path of the database.
Deploy in a Proxmox LXC container
On the Proxmox node (pick a free container id, e.g. 110):
pveam update && pveam available --section system | grep debian-13
pveam download local <template>
pct create 110 local:vztmpl/<template> --hostname localmonitor --unprivileged 1 \
--cores 2 --memory 2048 --swap 512 --rootfs local-lvm:12 \
--mp0 local-lvm:5,mp=/data --net0 name=eth0,bridge=vmbr0,ip=dhcp \
--features nesting=1,keyctl=1 --onboot 1
pct start 110
Inside the container:
apt update && apt install -y git curl
curl -fsSL https://get.docker.com | sh
git clone https://code.manfred.no/manfred/LocalMonitor.git /opt/localmonitor
# copy your .env to /opt/localmonitor/.env, then set DATA_DIR=/data and WEB_PORT=80
cd /opt/localmonitor && docker compose up -d --build
Update: git pull && docker compose up -d --build.
Develop locally
Rootless podman/docker without bridge networking: use the host-network override (site on port 1337).
podman-compose -f docker-compose.yml -f docker-compose.local.yml up -d --build
Or run the parts directly:
go run ./cmd/collector # DB_PATH=./monitor.db plus .env values
go run ./cmd/server # DB_PATH=./monitor.db STATIC_DIR=web/dist LISTEN_ADDR=:8080
cd web && npm install && npm run dev