anourvalar/laravel-health
Additional Checks for Laravel Health (Spatie)
30,374
| Install | |
|---|---|
composer require anourvalar/laravel-health |
|
| Latest Version: | 1.15.10 |
| PHP: | ^8.0 |
| License: | MIT |
| Last Updated: | Aug 8, 2026 |
| Links: | GitHub · Packagist |
Maintainer: AnourValar
Laravel Health
Installation
composer require anourvalar/laravel-health
Checks for spatie/laravel-health
FilesystemCheck
\Spatie\Health\Facades\Health::checks([
\AnourValar\LaravelHealth\FilesystemCheck::new()->disks(['s3' => ($checkPublicUrl = true)]),
]);
OpcacheCheck
\Spatie\Health\Facades\Health::checks([
\AnourValar\LaravelHealth\OpcacheCheck::new(),
]);
PusherCheck
\Spatie\Health\Facades\Health::checks([
\AnourValar\LaravelHealth\PusherCheck::new()->connection(null), // default connection
]);
QueueFailedCheck
\Spatie\Health\Facades\Health::checks([
\AnourValar\LaravelHealth\QueueFailedCheck::new(),
]);
XdebugCheck
\Spatie\Health\Facades\Health::checks([
\AnourValar\LaravelHealth\XdebugCheck::new(),
]);
SSL Certificate
\Spatie\Health\Facades\Health::checks([
\AnourValar\LaravelHealth\SSLCertCheck::new()
->url('google.com')
->warnWhenExpiringDay(10)
->failWhenExpiringDay(2),
]);
Cpu Load
\Spatie\Health\Facades\Health::checks([
\AnourValar\LaravelHealth\CpuLoadCheck::new()->failWhenLoadIsHigher(
2.5, // last minute
2.0, // last 5 minutes
1.5 // last 15 minutes
),
]);
Gzip
\Spatie\Health\Facades\Health::checks([
\AnourValar\LaravelHealth\GzipCheck::new()
->shouldBeGzipped('/')
->shouldNotBeGzipped('/image.png'),
]);
Reverse Proxy Security
First, you need to register a route for the checker.
Route::any('/health-ping', HealthPingController::class);
\Spatie\Health\Facades\Health::checks([
\AnourValar\LaravelHealth\ReverseProxySecurityCheck::new()->url('/health-ping'),
]);
HTTP -> HTTPS 301 redirect
\Spatie\Health\Facades\Health::checks([
\AnourValar\LaravelHealth\Http2HttpsCheck::new()
->shouldBeRedirected(['/', '/image.png']),
]);
WWW -> none WWW 301 redirect
\Spatie\Health\Facades\Health::checks([
\AnourValar\LaravelHealth\Www2NoneCheck::new()
->shouldBeRedirected(['/', '/image.png']),
]);
Mailer
\Spatie\Health\Facades\Health::checks([
\AnourValar\LaravelHealth\MailerCheck::new()
->mailer(null), // default
]);
Sentry
\Spatie\Health\Facades\Health::checks([
\AnourValar\LaravelHealth\SentryCheck::new(),
]);
Directory Permissions
\Spatie\Health\Facades\Health::checks([
\AnourValar\LaravelHealth\DirectoryPermissionsCheck::new()
->writable(storage_path('logs'))
->notWritable(app_path('')),
]);
CORS
\Spatie\Health\Facades\Health::checks([
\AnourValar\LaravelHealth\CorsCheck::new()
->allowed('https://good.com')
->disallowed('https://evil.com')
->url('api/sanctum/csrf-cookie'), // target endpoint
]);
Cache Headers
\Spatie\Health\Facades\Health::checks([
\AnourValar\LaravelHealth\CacheHeadersCheck::new()
->shouldBeCached('/image.png')
->shouldNotBeCached('/'),
]);
Root (user)
\Spatie\Health\Facades\Health::checks([
\AnourValar\LaravelHealth\RootCheck::new(),
]);
FastCGI
First, you need to register a route for the checker.
Route::any('/health-ping', HealthPingController::class);
\Spatie\Health\Facades\Health::checks([
\AnourValar\LaravelHealth\FastCGICheck::new()->url('/health-ping'),
]);
Queue size
\Spatie\Health\Facades\Health::checks([
\AnourValar\LaravelHealth\QueueSizeCheck::new()
->add(['connection' => null, 'name' => null, 'max_size' => 200]),
]);
Octane server
\Spatie\Health\Facades\Health::checks([
\AnourValar\LaravelHealth\OctaneCheck::new(),
]);
Redis Config
\Spatie\Health\Facades\Health::checks([
\AnourValar\LaravelHealth\RedisConfigCheck::new(),
]);
HTTP/2
\Spatie\Health\Facades\Health::checks([
\AnourValar\LaravelHealth\HttpV2Check::new()->urls('/'),
]);
HSTS
\Spatie\Health\Facades\Health::checks([
\AnourValar\LaravelHealth\HstsCheck::new()->urls('/'),
]);
DB Config (Postgresql, Mysql)
\Spatie\Health\Facades\Health::checks([
\AnourValar\LaravelHealth\DBConfigCheck::new()
->params(['transaction_isolation' => 'read committed']), // READ-COMMITTED
]);
Related Packages
cboxdk/laravel-health
Health checks, Kubernetes probes, Prometheus metrics, and system monitoring for...
4,630
23
encodia/laravel-health-env-vars
Custom check for Spatie's Laravel Health - Ensure every .env variable you need h...
188,989
20
Version History
| Version | Released | PHP | Laravel | License |
|---|---|---|---|---|
| 1.15.10 | ^8.0 | ^8.0| | MIT | |
| 1.15.9 | ^8.0 | ^8.0| | MIT | |
| 1.15.8 | ^8.0 | ^8.0| | MIT | |
| 1.15.7 | ^8.0 | ^8.0| | MIT | |
| 1.15.6 | ^8.0 | ^8.0| | MIT | |
| 1.15.5 | ^8.0 | ^8.0| | MIT | |
| 1.15.4 | ^8.0 | ^8.0| | MIT | |
| 1.15.3 | ^8.0 | ^8.0| | MIT | |
| 1.15.2 | ^8.0 | ^8.0| | MIT | |
| 1.15.1 | ^8.0 | ^8.0| | MIT | |
| 1.15.0 | ^8.0 | ^8.0| | MIT | |
| 1.14.8 | ^8.0 | ^8.0| | MIT | |
| 1.14.7 | ^8.0 | ^8.0| | MIT | |
| 1.14.6 | ^8.0 | ^8.0| | MIT | |
| 1.14.5 | ^8.0 | ^8.0| | MIT | |
| 1.14.4 | ^8.0 | ^8.0| | MIT | |
| 1.14.3 | ^8.0 | ^8.0| | MIT | |
| 1.14.2 | ^8.0 | ^8.0| | MIT | |
| 1.14.1 | ^8.0 | ^8.0| | MIT | |
| 1.14.0 | ^8.0 | ^8.0| | MIT | |
| 1.13.5 | ^8.0 | ^8.0| | MIT | |
| 1.13.4 | ^8.0 | ^8.0| | MIT | |
| 1.13.3 | ^8.0 | ^8.0| | MIT | |
| 1.13.2 | ^8.0 | ^8.0| | MIT | |
| 1.13.1 | ^8.0 | ^8.0| | MIT | |
| 1.13.0 | ^8.0 | ^8.0| | MIT | |
| 1.12.3 | ^8.0 | ^8.0| | MIT | |
| 1.12.2 | ^8.0 | ^8.0| | MIT | |
| 1.12.1 | ^8.0 | ^8.0| | MIT | |
| 1.12.0 | ^8.0 | ^8.0| | MIT |
Showing the latest 30 of 56. See every release on Packagist