Skip to content

kew health

Attest that the control plane itself is functioning — a monitoring/CI gate.

kew health                # human table; exit 0 healthy / 1 degraded / 2 can't read db
kew health --json         # machine-readable result for monitors/CI
kew health --window 14    # retrospective window in days (default 7)

Checks

Check What it verifies
meter_running Successful runs on non-free models recorded cost/tokens (catches silent-zero metering; includes models with no pricing entry).
spend_within_limits Daily/weekly spend is within the configured [budget] limits (warn at 80%; fixed daily/7-day window, independent of --window). Attests spend is within bounds, not per-dispatch enforcement.
audit_parses Every audit_events row in the window parses end-to-end (payload + envelope fields).
runner_reachable Every configured routing-tier runner's CLI is on PATH (+ credential env var where detectable).
dispatch_state Dispatch enabled, or warn (visible, non-paging) when halted by kew stop / the circuit breaker.

Exit codes

0 — all checks pass (warnings allowed). 1 — at least one check failed. 2 — the run store could not be read.

kew health --json emits {healthy, exit_code, window_days, checks: [{name, status, summary, detail}]}.