Monitoring
Health checks
| Endpoint | Answers |
|---|---|
/healthz | the process is up ({"status":"ok","version":…}) |
/readyz | Postgres and the object store answer, with timings; 503 when either doesn't |
Point an uptime checker (Uptime Kuma, Better Stack) at https://<app host>/readyz with the keyword "ok".
Metrics
Set LODEBASE_METRICS_TOKEN and /metrics serves Prometheus metrics to a scraper that sends it as a bearer token. Keep /metrics off your public route (the production stack's Traefik does).
yaml
scrape_configs:
- job_name: lodebase
authorization: { type: Bearer, credentials_file: /etc/prometheus/lodebase_token }
static_configs: [{ targets: ["lodebase:7420"] }]| Metric | Meaning |
|---|---|
lodebase_database_up, lodebase_storage_up | 1 when Postgres / the object store answer |
lodebase_repos, lodebase_users, lodebase_orgs, lodebase_changesets | counts |
lodebase_storage_bytes, lodebase_repo_storage_bytes{repo} | bytes counted against storage limits |
lodebase_locks, lodebase_workspaces_active, lodebase_open_merge_requests | activity right now |
lodebase_pipeline_jobs{state}, lodebase_runners_online | queued / running jobs and live runners |
lodebase_gc_last_finished_seconds | when garbage collection last finished |
lodebase_build_info{version} | the server version |
The production stack provisions a Grafana dashboard (LodeBase overview) and alerts for: LodeBase down, a disk under 15% free, garbage collection stale for 2 days, jobs waiting with no runner online, and certificates expiring.
Logs
The server logs to stdout (RUST_LOG sets the level). In the production stack, Alloy ships container logs and the host's journal to Loki: in Grafana, Explore → Loki, {service="lodebase"}.