Customize checks
To customize the package according to your application's needs, you can add your own checks, disable default ones or change their warning and failure thresholds.
To see which checks you have currently set up, use the list command.
OPTIONAL
This page documents how to customize the checks. If you are happy with the defaults, you can safely skip everything here.
Where to do this work?
You can configure your checks inside the boot()
method of your AppServiceProvider
.
You can take the following snippet as a starting example:
<?php
namespace App\Providers;
use Appkeep\Laravel\Facades\Appkeep;
use Illuminate\Support\ServiceProvider;
use Appkeep\Laravel\Checks\DiskUsageCheck;
use Appkeep\Laravel\Checks\UbuntuSecurityUpdatesCheck;
class AppServiceProvider extends ServiceProvider
{
public function boot()
{
// Uncomment this to disable all default checks
// Appkeep::forgetDefaultChecks();
Appkeep::checks([
// This replaces the default disk usage check thresholds.
DiskUsageCheck::make()
->warnIfUsedPercentageIsAbove(60)
->failIfUsedPercentageIsAbove(70),
// Register other checks from the package.
UbuntuSecurityUpdatesCheck::make(),
// Or add your own custom checks
MyCustomCheck::make(),
]);
}
}