Monitoring

Health and readiness checks, Prometheus metrics, logs, traces and the operator's own diagnostics.

Wardn exposes what you need to run it like any other service: probes for your orchestrator, Prometheus metrics, JSON logs and OpenTelemetry traces. None of them carry an organization's content. This page lists each, then what to alert on.

Health and readiness

The API answers two public endpoints, with no credential, for load balancers and probes:

EndpointAnswers 200 whenBody
GET /api/v1/healthThe process is up.{"status":"ok"}
GET /api/v1/readyThe database answers, every migration has run, and the web app's sign-in tables exist. Otherwise 503.The checks, below
{
  "ready": false,
  "checks": [
    {"name": "database", "ok": true},
    {"name": "migrations", "ok": false, "message": "pending: 0220_guardrails"},
    {"name": "identity", "ok": true},
    {"name": "render_sandbox", "ok": true}
  ]
}
CheckFails when
databaseThe database does not answer within 3 seconds. The other two are then not checked.
migrationsA migration has not run yet, or the list of applied migrations cannot be read.
identityThe web app's sign-in tables are missing or changed. Start the web app once to create them.
render_sandboxAdvisory: it is listed, but never makes ready false or takes the API out of service. The sandbox that renders Helm and Kustomize sources cannot start (it needs to create user and network namespaces, which a seccomp profile or the host may forbid), so every render of a chart source would fail with "operation not permitted". The message names the fix: set the chart's server.seccompProfile (worker.seccompProfile on wardn-scale) to {type: Unconfined}, or to a profile that allows unshare(CLONE_NEWUSER). The same message is logged once at start.

The charts use /api/v1/health for the startup and liveness probes and /api/v1/ready for the readiness probe. The web app's probes are TCP checks on its port.

The ops address

When WARDN_OPS_ADDR is set, every server process serves a second listener for operations, whatever its roles. The charts set it to :9090 and expose it on the wardn-server Service as the port ops.

PathWhat it is
/livez200 while the process runs.
/readyz200 when the database pools answer and what this process's roles need is ready, else 503 with the names of what is not. The api role also needs its listener bound and the Better Auth tables; the gateway role, the listener operators dial; the worker role, a first answer from the queue. A process is never asked for what a role it does not run needs.
/metricsPrometheus metrics.
/debug/pprof/Go profiles: CPU, heap, goroutines.

Keep the ops address off the public network. Profiles show the program's internals, and /debug/pprof/profile costs CPU while it runs.

Metrics

Scrape /metrics on port 9090 of each server pod. If your Prometheus discovers targets from pod annotations, add them with server.podAnnotations.

MetricTypeLabelsWhat it shows
wardn_http_request_duration_secondshistogrammethod, route, status (2xx, 4xx...)Time to answer an API request, by route template.
wardn_http_requests_in_flightgaugeAPI requests being answered now.
wardn_db_pool_acquired_connectionsgaugepool (request, direct)Connections in use.
wardn_db_pool_idle_connectionsgaugepoolConnections open and idle.
wardn_db_pool_max_connectionsgaugepoolThe pool's size.
wardn_db_pool_wait_totalcounterpoolTimes a request had to wait for a connection.
wardn_work_queue_depthgaugestate (ready, scheduled, running)Background work waiting, scheduled for later and running.
wardn_work_queue_oldest_ready_secondsgaugeHow long the longest-waiting due job has waited.
wardn_gateway_operatorsgaugeversion, protocol, upgrade_neededOperators connected to this replica's gateway.

The standard Go runtime and process metrics (go_*, process_*) are there too. No metric has an organization, cluster or person as a label.

What to alert on

ConditionSuggests
/api/v1/ready failing for more than a few minutesThe database is down, or a migration is stuck.
wardn_work_queue_oldest_ready_seconds rising steadilyBackground work is not keeping up: renders and applies are delayed.
rate(wardn_db_pool_wait_total[5m]) above zero for a long timeThe pool is too small for the load, or the database is slow.
wardn_gateway_operators{upgrade_needed="true"} above zeroSome operators are too far behind (Upgrading).
A drop in sum(wardn_gateway_operators)Clusters lost their connection: check the gateway's address and certificate.
The 95th percentile of wardn_http_request_duration_seconds above a few hundred millisecondsThe API is slow. List endpoints are built to answer in well under 100 ms.

Logs

The server writes one JSON object per line to standard output.

SettingDefaultValues
LOG_LEVELinfodebug, info, warn, error
LOG_FORMATjson (text when APP_ENV is development)json, text

Secrets are redacted from logs, and terminal input and output are never logged; a terminal session's log lines name the session id and sizes only. In the charts, set logging.level and logging.format.

Traces

Set WARDN_TRACES_ENDPOINT to an OTLP/HTTP collector, such as http://otel-collector:4318, and Wardn sends traces. API requests, database transactions and background jobs become spans, with the organization id as an attribute so you can follow one organization's work.

WARDN_TRACES_SAMPLE (default 0.1) is the share of new traces kept, from 0 to 1. A request that arrives already sampled by its caller stays sampled. In the charts, set tracing.endpoint and tracing.sample.

The operator

Each operator serves its own probes and metrics on port 8081 in its cluster:

PathWhat it is
/healthzLiveness.
/readyzReadiness.
/metricsPrometheus metrics.

For its state, ask the running operator. The report shows its version, connection state, the range of its local buffer, what it is watching and its settings, as JSON:

kubectl -n wardn-system exec deploy/wardn-operator -- wardn-operator diagnose

The report never contains the join token, a stream token, a key or a certificate, so you can paste it into a support request.

From your desk, wardn clusters lists every cluster with its operator's version and whether it is online.

Next

On this page