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:
| Endpoint | Answers 200 when | Body |
|---|---|---|
GET /api/v1/health | The process is up. | {"status":"ok"} |
GET /api/v1/ready | The 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}
]
}| Check | Fails when |
|---|---|
database | The database does not answer within 3 seconds. The other two are then not checked. |
migrations | A migration has not run yet, or the list of applied migrations cannot be read. |
identity | The web app's sign-in tables are missing or changed. Start the web app once to create them. |
render_sandbox | Advisory: 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.
| Path | What it is |
|---|---|
/livez | 200 while the process runs. |
/readyz | 200 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. |
/metrics | Prometheus 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.
| Metric | Type | Labels | What it shows |
|---|---|---|---|
wardn_http_request_duration_seconds | histogram | method, route, status (2xx, 4xx...) | Time to answer an API request, by route template. |
wardn_http_requests_in_flight | gauge | API requests being answered now. | |
wardn_db_pool_acquired_connections | gauge | pool (request, direct) | Connections in use. |
wardn_db_pool_idle_connections | gauge | pool | Connections open and idle. |
wardn_db_pool_max_connections | gauge | pool | The pool's size. |
wardn_db_pool_wait_total | counter | pool | Times a request had to wait for a connection. |
wardn_work_queue_depth | gauge | state (ready, scheduled, running) | Background work waiting, scheduled for later and running. |
wardn_work_queue_oldest_ready_seconds | gauge | How long the longest-waiting due job has waited. | |
wardn_gateway_operators | gauge | version, protocol, upgrade_needed | Operators 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
| Condition | Suggests |
|---|---|
/api/v1/ready failing for more than a few minutes | The database is down, or a migration is stuck. |
wardn_work_queue_oldest_ready_seconds rising steadily | Background work is not keeping up: renders and applies are delayed. |
rate(wardn_db_pool_wait_total[5m]) above zero for a long time | The pool is too small for the load, or the database is slow. |
wardn_gateway_operators{upgrade_needed="true"} above zero | Some 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 milliseconds | The 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.
| Setting | Default | Values |
|---|---|---|
LOG_LEVEL | info | debug, info, warn, error |
LOG_FORMAT | json (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:
| Path | What it is |
|---|---|
/healthz | Liveness. |
/readyz | Readiness. |
/metrics | Prometheus 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 diagnoseThe 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.