Skip to content

Metrics

RunWisp can serve a /metrics endpoint in OpenMetrics 1.0 text format. It’s off by default. Turn it on in runwisp.toml and restart the daemon:

runwisp.toml
[daemon]
metrics_enabled = true

The endpoint needs no password. Anyone who can reach it sees your task names and the daemon version, but never secrets, run output, or commands.

scrape_configs:
- job_name: runwisp
scrape_interval: 30s
static_configs:
- targets: ["localhost:9477"]

Prometheus and the OpenTelemetry Collector read it with no extra settings. To check the output with promtool:

Terminal window
curl -s http://localhost:9477/metrics | promtool check metrics

Values are computed on every scrape; there’s no cache.

Metric Type Labels Meaning
runwisp_runs_total counter status Stored runs by outcome: success, failed, or missed
runwisp_runs_last_failure_timestamp_seconds gauge Unix time of the latest failed run; absent if no run has failed
runwisp_task_active_runs gauge task, kind Runs in progress per task; kind is task or service
runwisp_task_cpu_percent gauge task, kind Live CPU use of a task’s running processes; 100 is one core
runwisp_task_memory_bytes gauge task, kind Live resident memory of a task’s running processes
runwisp_daemon_cpu_percent gauge Host CPU use as seen by the daemon (0 to 100)
runwisp_daemon_memory_used_bytes gauge Host memory in use
runwisp_daemon_memory_total_bytes gauge Total host memory
runwisp_daemon_uptime_seconds gauge Seconds since the daemon started
runwisp_build_info gauge version Always 1; the label is the daemon version
  • failed counts runs your failures policy marks as failures. missed is counted on its own, not as failed.
  • runwisp_runs_total counts the runs currently stored, so it drops when retention deletes old runs.
  • To alert on any failure in the last ten minutes: time() - runwisp_runs_last_failure_timestamp_seconds < 600. The metric is absent until the first failure, so the alert stays quiet until then.

since: 1.5

RunWisp measures the CPU and memory of every run command while it runs. The web UI shows the live values next to each running task. The TUI shows them in the task header and in the task list on the Info page. The per-task gauges above export them too. Each finished run also records its peak memory and total CPU time, shown in the run’s details in the web UI and the TUI.

  • RunWisp counts every process in the run’s process group. A process that leaves the group (for example with setsid) is not counted.
  • container, compose, and http tasks are not measured; their work runs outside the daemon’s process tree.
  • Memory is sampled, so a run that finishes in well under a second may have no peak memory. Its CPU time is always recorded.
  • The per-task gauges only appear while the task has a running process.

Pick the setup that matches how the daemon is reachable:

  • Daemon on loopback (the default). Nothing to do. Only local scrapers can reach /metrics.

  • Web UI on the network, metrics local. Serve metrics on their own address:

    runwisp.toml
    [daemon]
    metrics_listen = "127.0.0.1:9478"

    That listener serves only /metrics, over plain HTTP. /health, the UI, and the API stay on the main one. See metrics_listen.

  • Metrics on the network too. Put a reverse proxy in front and require authentication for /metrics there (basic auth, mTLS, or a bearer token).