spatie/laravel-health
Monitor your Laravel app’s health by registering checks (disk space, queues, cache, etc.). Set warning/fail thresholds and get notified via mail or Slack when something goes wrong, so you can catch issues early and keep services running smoothly.
Pros:
health.php config aligns with Laravel’s convention-over-configuration philosophy.Cons:
health container alias (fixed in v1.39.2) could resurface in custom middleware-heavy apps.laravel-notification-channels). May require additional setup for non-standard channels.spatie/laravel-health) with zero runtime conflicts (MIT license, no hard dependencies beyond Laravel core).AppServiceProvider@boot()./health endpoint for HTTP-based monitoring (e.g., Kubernetes probes).@hourly).config/health.php (Slack, Mail, etc.).Health::checks()). Middleware collision risk mitigated in v1.39.2+.PingCheck::timeoutMs()).only_on_failure setting (v1.35.0+) reduces noise, but misconfigured thresholds may still flood channels. Use failAfterMinutes to limit alert frequency.DatabaseConnectionCheck, QueueCheck over UsedDiskSpaceCheck.)/health endpoint publicly? (Security review needed if yes.)/health endpoint).DatabaseConnectionCheck, QueueCheck, PingCheck).CacheCheck, UsedDiskSpaceCheck)./health endpoint with appropriate middleware (e.g., rate limiting, auth).warnAt: 70%, failAt: 90%).laravel-notification-channels for Slack/PagerDuty (or custom channels).php artisan vendor:publish --provider="Spatie\Health\HealthServiceProvider").AppServiceProvider@boot().config/health.php.app/Console/Kernel.php)./health endpoint (optional, via middleware).composer update spatie/laravel-health
config/health.php (no scattered logic).spatie/temporary-directory moved to require-dev in v1.40.0).config/health.php).Health::checks() returns a Collection of check results with metadata (e.g., isPassing(), message()).failAfterMinutes to avoid alert fatigue.QueueCheck) or limit check frequency.How can I help you explore Laravel packages today?