Health checks
/api/v1/healthz
Section titled “/api/v1/healthz”GET /api/v1/healthz answers 200 OK with the running version while the server is up. It needs no sign-in and is never cached.
curl -s http://127.0.0.1:8080/api/v1/healthz{"status":"ok","version":"0.1.0"}With server.base_path set, it answers under that prefix like every other route, and at /api/v1/healthz as well.
encore healthcheck
Section titled “encore healthcheck”encore healthcheck calls the health endpoint of the server on the same machine and exits 0 when it answers 200, or 1 otherwise. It reads the same configuration as encore serve, so it finds the right port. The container image uses it as its HEALTHCHECK (every 30 seconds, after a 20-second start period):
docker inspect --format '{{.State.Health.Status}}' encoreKubernetes
Section titled “Kubernetes”livenessProbe: httpGet: path: /api/v1/healthz port: 8080 periodSeconds: 30readinessProbe: httpGet: path: /api/v1/healthz port: 8080 periodSeconds: 10Metrics
Section titled “Metrics”Encore has no metrics endpoint yet. The request log and the overview in the web interface show request counts, failures and response times, and Encore’s log can be written as JSON (log.format: json) for a log pipeline.