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.

SRE & platform — agent fleets Embedded & edge — no_std bare-metal Polyglot daemons — Rust, Python, Go, Node, .NET, JVM

From nothing to a detected stall in 60 seconds.

  1. 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. 2

    Beat from your agent

    Connect once, beat every 500 ms — well under the 2 s threshold. (pip install varta · npm i @varta-health/client for other languages.)

    cargo add varta-client
    use 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. 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

Built for tight p99 budgets.

P99 Latency 1166 ns sub-microsecond
CPU (50 agents) 0.0535% nearly invisible
Binary Overhead 4.1 KB minimal footprint

Measured on Apple Silicon · Rust 1.93.1 · varta-bench


From heartbeat to recovery.

  1. 1

    Connect

    Varta::connect() opens a non-blocking Unix Datagram socket (or connect_udp() for networks). One allocation. That’s it.

  2. 2

    Beat

    agent.beat(Status::Ok, payload) encodes 32 bytes on the stack and calls send(2). Returns Sent, Dropped, or Failed — 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. 3

    Observe

    varta-watch polls the socket, tracks per-pid state machines, detects stalls, runs recovery commands, exports Prometheus metrics.


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.

  1. systemd WatchdogSec

    Processes are 1:1 with units and recovery is just Restart=. Already on the host, costs nothing extra.

  2. supervisord / monit

    One manager for a modest set of children on a non-systemd host, where “process is alive” is signal enough.

  3. k8s liveness probes

    You’re already on Kubernetes and the kubelet schedules and restarts your containers. Don’t add anything.

  4. HTTP /health

    The workload is already an HTTP server and you want rich JSON a human can curl. Note: it signals, it doesn’t recover.

Full comparison matrix →


Three crates. Zero deps.