RUD/README.md

2.4 KiB

R u ded? (rud)

Lightweight uptime monitor and health checker written in Go by [tyuXX] (git.gsdistance.org/tyuXX/RUD).

Mainly created for use in GsDistance.org.

Compiles to a single static binary, checks http/https, tcp, ping, dns, and cmd targets, sends declarative alerts (webhooks/commands), and serves a minimal status page plus JSON health output — all configured through one rud.json file. Full check history is kept in daily JSONL logs (zstd-compressed) and a SQLite stats database, viewable per-monitor at /monitor.


Quick Start

Standalone binary

go build -trimpath -ldflags="-s -w" -o rud .

./rud config -config rud.json    # interactive config builder (new or edit)
./rud validate -config rud.json  # validate & lint configuration
./rud test -config rud.json      # run one-shot live checks
./rud -config rud.json           # run server (auto-generates rud.json if missing)

Then open http://localhost:8080/ (HTML), http://localhost:8080/monitor (per-monitor history & charts), or http://localhost:8080/?format=json (JSON).

CLI Subcommands

  • ./rud config [-config path] [-new] [-plain] [-no-color]: Interactive configuration builder (arrow-key navigation on TTYs with automatic numbered fallback; -new forces the starter template / quick-start wizard).
  • ./rud validate [-config path] [-strict]: Validates schema, regexes, URLs, and alert templates, and reports lint warnings (unknown JSON fields, dangling monitor IDs). -strict treats lint warnings as errors.
  • ./rud test [-config path] [-json] [-no-retry] [monitor-ids...]: Executes live monitor checks once and prints results (exits non-zero if any tested monitor is down).
  • ./rud -init -config rud.json: Non-interactively writes a default rud.json and exits.

Docker Compose

docker compose up -d --build   # exposes port 8080, persists ./data

Docker Compose + Cloudflare Tunnel (no exposed ports)

cp .env.example .env           # set TUNNEL_TOKEN=...
docker compose -f docker-compose.cloudflared.yml up -d --build

Point your tunnel's public hostname at http://rud:8080.


Configuration

See CONFIGURATION.md for the full rud.json reference — monitors, check methods, alert events, page elements, and storage/history options.


License

MIT — Created by tyuXX for GsDistance.org.