DocsOperationsMonitoring

Monitoring

Health checks and runtime signals.

Compose health

Start with docker compose ps and identify the first unhealthy dependency. Application failures often originate in certificate generation, infrastructure readiness, topic initialization, or migrations.

Health checks

Compose checks PostgreSQL with TLS psql, ClickHouse with the secure client, Redis with TLS, Meilisearch over HTTPS, and gRPC services with authenticated TLS probes.

Service signals

Monitor request and RPC latency, Kafka consumer progress, outbox pending and dead rows, expired job leases, execution retries, log processor batch failures, ClickHouse insert latency, Meilisearch health, and database pool saturation.

For endpoint traffic, use histogram counts for request rate, status-code attributes for error ratios, and histogram buckets for latency percentiles. Group REST traffic by http.route rather than raw URL paths, and group gRPC traffic by rpc.service and rpc.method.

Container cleanup signals

Use the durable cleanup gauges to distinguish execution failures from publication failures:

SignalFirst response
Sustained nonzero quarantinedInspect the retained failure and original runtime, repair it, then request an audited redrive
Sustained nonzero publication_deadInspect outbox/Kafka publication before redriving the retained cleanup
Rising oldest_dueCheck consumer progress, abandoned execution leases, connectivity and repeated worker interruptions
Rising outstandingCompare arrival and completion rates; backlog alone does not prove failure

Use max across jobs-service replicas because each reports the same durable state. Choose age thresholds above normal delivery latency; five minutes overdue sustained for five minutes is an initial example to tune for the deployment. This threshold measures waiting execution, independently of the publisher's replay interval. A future replay deadline does not mean cleanup must wait: existing Kafka deliveries can still run. If no usable delivery remains, execution may depend on the next eligible replay. Cross-check cleanup_replay_due_at, publication state and consumer progress before diagnosing a stuck worker; publication_dead still requires operator repair. Missing telemetry is not a zero backlog.

Quarantine does not prove removal and does not release a workflow admission gate or runtime capacity hold. Use the cleanup recovery procedure and the retained-row queries in the runbook to identify affected work.

Cleanup inspection SQL and operational thresholdsdocs/operations.md

User-visible checks

Track scheduling delay, workflow build failures, jobs stuck outside terminal states, SSE connection failures, missing retained logs, and analytics lag.

First response

docker compose -f compose.prod.yaml ps
docker compose -f compose.prod.yaml logs --since=15m server
docker compose -f compose.prod.yaml logs --since=15m outbox-relay
docker compose -f compose.prod.yaml logs --since=15m execution-worker