pragmarx/health
PragmarX Health is a Laravel package that monitors your application's vital signs: database, cache, disk, SSL certificates, APIs, and custom checks. It provides a dashboard, alerts, notifications, and scheduled health checks so you can quickly catch problems before your users do.
composer require pragmarx/health and expect dependency resolution to be the first real test; on Laravel 9/10+ this will usually conflict with illuminate/* constraints.Pragmarx\Health\HealthServiceProvider::class to config/app.php providers and optionally alias Health to Pragmarx\Health\Facades\Health::class.php artisan vendor:publish --provider="Pragmarx\Health\HealthServiceProvider"
Publish the config first, then the public assets if the dashboard is served from the package’s asset route. Clear config cache afterward: php artisan config:clear.config/health.php before opening the UI. The important keys are the panel definitions, the checks assigned to each panel, route prefix/middleware, and notification channels. This file is the package’s control surface./health or the configured prefix. You should see a panel of checks with pass/fail state. Use this as a replacement for a hand-rolled /up endpoint and for quick “is the app healthy?” checks during deploys.auth middleware, and use it during releases to confirm infrastructure dependencies before and after deploy.internal panel behind auth/can middleware for operators, and a minimal public panel containing only non-sensitive checks (e.g., app key present, HTTP reachability) for status pages or load balancers. Never expose database names, disk paths, or queue details publicly.storage, upload volumes), database checks should target the exact connection used in production, and HTTP/ping checks should target internal health endpoints with short timeouts. Keep these values in config, not in custom code.ok states as failures; verify the HTTP status code behavior in your version, since some checks return 200 with a failure body.check()/run() method returning a status and message), place it under app/Health/Checks, and register it in the panel config. Good candidates: pending migrations, failed jobs count, storage writeability, third-party API credentials, certificate expiry.php artisan migrate and cache warmup in CI/CD. Fail the deploy if critical checks fail; log the JSON response as an artifact for postmortem debugging.auth, IP allow-listing, or a signed URL before exposing the dashboard. This is the most common operational mistake with health dashboards.php artisan config:clear (and config:cache in deploy). If a check “disappears,” cached config is the first suspect.APP_URL/proxy configuration.TrustProxies and test from the same network perspective as production monitoring.storage/logs/laravel.log; add try/catch inside custom checks to return a useful diagnostic message.composer.json.How can I help you explore Laravel packages today?