cboxdk / laravel-health
Health checks, Kubernetes probes, Prometheus metrics, and system monitoring for Laravel
v3.0.0
2026-09-26 06:31 UTC
Requires
- php: ^8.4
- cboxdk/system-metrics: ^3.0
- illuminate/console: ^12.0 || ^13.0
- illuminate/contracts: ^12.0 || ^13.0
- illuminate/http: ^12.0 || ^13.0
- illuminate/routing: ^12.0 || ^13.0
- illuminate/support: ^12.0 || ^13.0
- illuminate/view: ^12.0 || ^13.0
Requires (Dev)
- larastan/larastan: ^3.12
- laravel/pint: ^1.14
- nunomaduro/collision: ^8.9
- orchestra/testbench: ^10.0 || ^11.0
- pestphp/pest: ^4.0 || ^5.0
- pestphp/pest-plugin-arch: ^4.0 || ^5.0
- pestphp/pest-plugin-laravel: ^4.0 || ^5.0
- phpstan/extension-installer: ^1.4
- phpstan/phpstan-deprecation-rules: ^2.0
- phpstan/phpstan-phpunit: ^2.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Health checks, Kubernetes probes, Prometheus metrics, and system monitoring for Laravel.
Quick Start
composer require cboxdk/laravel-health
php artisan vendor:publish --tag="health-config"
curl http://localhost/health
Features
- Kubernetes Probes — liveness, readiness, and startup endpoints out of the box
- Prometheus Metrics —
/health/metricswith health check status and system metrics - 10 Built-in Checks — database, cache, queue, storage, Redis, environment, schedule, CPU, memory, disk space
- System Metrics — CPU load, memory, disk, network via cboxdk/system-metrics
- Container Aware — automatic cgroup detection for Docker/Kubernetes
- JSON Metrics API — structured system metrics at
/health/metrics/json - HTML Dashboard — optional real-time status UI
- Token & IP Auth — protect endpoints with bearer tokens and IP allowlists
- Response Caching — configurable TTL to reduce check overhead
- Fully Extensible — implement the
HealthCheckcontract to add checks, or rebindRunsHealthChecksto replace the runner - Test Helpers —
InteractsWithHealthandFakeHealthCheckRunnerto test your endpoints without real checks - No External Assets — the dashboard ships its own CSS; nothing is loaded from a CDN
Requirements
- PHP 8.4+
- Laravel 12.x or 13.x
Documentation
Full documentation is available in the docs/ directory. Upgrading from 2.x? Read UPGRADING.md.
Development
composer qa # code style, PHPStan (level max), tests, license check, audit composer test composer analyse composer format
Security
Please report vulnerabilities privately; see SECURITY.md.
Credits
License
The MIT License (MIT). Please see License File for more information.