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:
[daemon]metrics_enabled = trueThe 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 config
Section titled “Scrape config”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:
curl -s http://localhost:9477/metrics | promtool check metricsValues are computed on every scrape; there’s no cache.
Available metrics
Section titled “Available metrics”| 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 |
failedcounts runs yourfailurespolicy marks as failures.missedis counted on its own, not asfailed.runwisp_runs_totalcounts 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.
Task CPU and memory
Section titled “Task CPU and memory”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, andhttptasks 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.
Keeping it private
Section titled “Keeping it private”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. Seemetrics_listen. -
Metrics on the network too. Put a reverse proxy in front and require authentication for
/metricsthere (basic auth, mTLS, or a bearer token).