LaravelPaul Redmond3 min readintermediate
Health for Laravel: Kubernetes Probes and Prometheus Metrics
Summary
Laravel Health adds dedicated liveness, readiness, and startup probe endpoints that you can configure per‑check, and a Prometheus metrics endpoint exposing check status, duration, and container system gauges. The package includes built‑in checks, custom check support, CLI runner, and optional UI, making Kubernetes health monitoring straightforward for Laravel apps.
- Separate `/health`, `/health/ready`, and `/health/startup` endpoints are configurable via `config/health.php` with distinct check lists.
- Built‑in checks cover DB, cache, queue, storage, Redis, env, schedule, CPU, memory, and disk; custom checks implement the HealthCheck contract.
- Prometheus endpoint `/health/metrics` provides per‑check status/duration gauges plus container metrics like memory limit, usage, CPU quota, throttling, and OOM kills.
- `php artisan health:check` runs checks from the CLI; results are cached 10 seconds and can be filtered by probe type.
Laravel engineers deploying to Kubernetes need ready‑made health probes and Prometheus metrics to keep pods healthy and observable without writing custom glue code.
6/10




