Your background workers die silently. Find out before your users do.
A wedged daemon shows up as a backed-up queue or a customer ticket — not as
anything the process tells you. One varta-watch watches thousands of local processes over a
32-byte heartbeat each, restarts the stalled ones, and exports Prometheus metrics — instead of bolting
an HTTP endpoint, a systemd unit, or a pod onto every daemon.
00 — Quickstart
From nothing to a detected stall in 60 seconds.
-
1
Run the observer
One process watches every agent on the host and serves Prometheus on
:9100.curl -fsSL https://varta.sh/install.sh | sh varta-watch --socket /tmp/varta.sock \ --prom-addr 127.0.0.1:9100 --threshold-ms 2000 -
2
Beat from your agent
Connect once, beat every 500 ms — well under the 2 s threshold. (
pip install varta·npm i @varta-health/clientfor other languages.)cargo add varta-clientuse varta_client::{Varta, Status}; use std::{thread::sleep, time::Duration}; let mut agent = Varta::connect("/tmp/varta.sock")?; loop { let _ = agent.beat(Status::Ok, 0); sleep(Duration::from_millis(500)); } -
3
Watch it catch the stall
Kill the agent — within 2 s the observer logs the stall and the counter ticks. Add
--recovery-exec 'systemctl restart myagent'to auto-restart it.curl -s 127.0.0.1:9100/metrics | grep varta_stalls_total
01 — Benchmarks
Built for tight p99 budgets.
Measured on Apple Silicon · Rust 1.93.1 · varta-bench
02 — Pipeline
From heartbeat to recovery.
-
1
Connect
Varta::connect()opens a non-blocking Unix Datagram socket (orconnect_udp()for networks). One allocation. That’s it. -
2
Beat
agent.beat(Status::Ok, payload)encodes 32 bytes on the stack and callssend(2). ReturnsSent,Dropped, orFailed— a missing observer is never an error on your hot path.use varta_client::{Varta, Status}; let mut agent = Varta::connect("/tmp/varta.sock")?; loop { let _ = agent.beat(Status::Ok, queue_depth); std::thread::sleep(Duration::from_millis(500)); } -
3
Observe
varta-watchpolls the socket, tracks per-pid state machines, detects stalls, runs recovery commands, exports Prometheus metrics.
03 — Why not just…
systemd, k8s probes, or a /health endpoint?
For a single 1:1 daemon, systemd’s WatchdogSec is the right tool — use it.
Varta earns its place when you have many local processes and a unit file, a pod, or an inbound TCP port
per PID is too heavy or simply unavailable.
-
systemd
WatchdogSecProcesses are 1:1 with units and recovery is just
Restart=. Already on the host, costs nothing extra. -
supervisord / monit
One manager for a modest set of children on a non-systemd host, where “process is alive” is signal enough.
-
k8s liveness probes
You’re already on Kubernetes and the kubelet schedules and restarts your containers. Don’t add anything.
-
HTTP
/healthThe workload is already an HTTP server and you want rich JSON a human can
curl. Note: it signals, it doesn’t recover. -
Varta
Tens to thousands of local processes; embedded /
no_std/ non-systemd / no orchestrator; polyglot fleets; safety-critical builds with no HTTP server or shell.
04 — Workspace