spatie/laravel-health
Monitor your Laravel app’s health by registering checks (disk space, etc.) with warning/fail thresholds. Get notified via mail or Slack when checks degrade, and extend with custom checks for proactive alerting.
This check will monitor the percentage of available disk space.
By default, this check will send:
Here's how you can register the check.
use Spatie\Health\Facades\Health;
use Spatie\Health\Checks\Checks\UsedDiskSpaceCheck;
Health::checks([
UsedDiskSpaceCheck::new(),
]);
To customize the usage disk space percentages, you can use warnWhenUsedSpaceIsAbovePercentage and failWhenUsedSpaceIsAbovePercentage.
UsedDiskSpaceCheck::new()
->warnWhenUsedSpaceIsAbovePercentage(60)
->failWhenUsedSpaceIsAbovePercentage(80),
How can I help you explore Laravel packages today?