Skip to main content

Health Checks

Health checks let load balancers, orchestrators, and monitoring systems know if your server is ready to handle traffic. Prism’s PrismHealthMonitor runs checks on demand and serves results through a /health endpoint.

Quick Setup

Basic Health Endpoint

Adding Checks

Register Health Checks

Health Status Levels

The overall status is the worst individual check: if any check is .unhealthy, the report is unhealthy. If any is .degraded (and none unhealthy), the report is degraded.

Response Format

GET /health Response

Custom Endpoint Path

Custom Path

Programmatic Health Checks

Run checks without the middleware:
Manual Check
Kubernetes uses two kinds of probes: liveness (is the process alive?) and readiness (can it handle traffic?). Use /health for readiness probes. For liveness, a simple 200-OK endpoint that doesn’t check dependencies is usually enough.
Each check’s execution time is measured automatically. This helps identify slow dependencies — a database check that takes 5 seconds is a red flag even if it returns healthy.