Health checks made in production to ensure you can sleep well at night and be sure everything is still OK.
You can install the package via composer:
composer require vormkracht10/laravel-ok
You can then install the package by using the ok:install
Artisan command:
php artisan ok:install
This is the contents of the published config file:
return [
'notifications' => [
'enabled' => env('LARAVEL_OK_NOTIFICATIONS_ENABLED', true),
'failed_notification' => CheckFailedNotification::class,
'notifiable' => Notifiable::class,
'via' => [
// 'discord' => [
// 'channel' => 123456790,
// ],
// 'mail' => [
// 'to' => '[email protected]',
// ],
// 'slack' => [
// 'webhook' => 'webhook-url',
// ],
// 'telegram' => [
// 'channel' => 1234567890,
// ],
],
],
'checks' => [
'audit' => [
'path' => [
// '~/some/bin',
],
],
],
];
To register checks for your application, you need to register them in the checks
array in your AppServiceProvider
register method.
use Vormkracht10\LaravelOK\Facades\OK;
class AppServiceProvider extends ServiceProvider
{
// ...
public function register()
{
OK::checks([
EnvironmentCheck::shouldBe('production'),
DebugModeCheck::shouldBe('false'),
]);
}
}
✅ Cache Check: Check if reading and writing to the cache is possible.
✅ Composer Audit Check: Checks if there are any security vulnerabilities in your composer dependencies.
✅ Config Cache Check: Checks if the config is cached.
✅ Debug Mode Check: Checks if debug mode is enabled.
✅ Disk Space Check: Checks if the disk space is below a certain threshold.
✅ Environment Check: Checks if the current environment matches the given environment.
✅ Event Cache Check: Checks if events are cached.
✅ Horizon Check: Checks if Horizon is running.
✅ NPM Audit Check: Checks if there are any security vulnerabilities in your npm dependencies.
✅ Queue Check: Checks if the queue is running.
✅ Route Cache Check: Checks if routes are cached.
composer test
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
The MIT License (MIT). Please see License File for more information.