Laravel Health

spatie/laravel-health image

Laravel Health stats

Downloads
1.7M
Stars
607
Open Issues
0
Forks
120

View on GitHub →

Monitor the health of a Laravel application

Laravel Health by Spatie

The spatie/laravel-health package is a robust tool designed to monitor and report on the health of your Laravel application. It allows you to register various checks that assess the condition of different aspects of your app, such as disk space usage.

Key Features

  • Customizable Checks: Implement checks like UsedDiskSpaceCheck to monitor and react to specific conditions such as disk space thresholds.
  • Notifications: Configure alerts to be sent via email or Slack when certain parameters are met, such as warning and failure thresholds for disk usage.
  • Documentation: Comprehensive documentation is available, detailing how to implement and use the various features of the package.

Installation and Usage

Install the package via composer:

composer require spatie/laravel-health

Implement health checks within your application, for example:

use Spatie\Health\Facades\Health;
use Spatie\Health\Checks\Checks\UsedDiskSpaceCheck;
 
Health::checks([
UsedDiskSpaceCheck::new()
->warnWhenUsedSpaceIsAbovePercentage(70)
->failWhenUsedSpaceIsAbovePercentage(90),
]);

This configuration will send notifications based on the thresholds set for disk usage.

Additional Resources and Community Contributions

  • Support and Sponsorship: You can support the continued development of this and other Spatie packages by considering their paid products or sending a postcard.
  • Alternatives: Explore alternative packages if this one doesn't meet your needs.
  • Contributing: Contributions to the package are welcome, and the contribution guidelines are detailed in the repository.

Testing and Security

Run tests using:

composer test

For security vulnerability reports, review the package's security policy.

This package is an excellent choice for Laravel developers looking to implement health checks and monitoring within their applications, ensuring operational reliability and performance insights. Find more information and detailed documentation on the official documentation site.

spatie photo

We create open source, digital products and courses for the developer community

Cube

Laravel Newsletter

Join 40k+ other developers and never miss out on new tips, tutorials, and more.


Spatie Laravel Health Related Articles

SaaSykit: Laravel SaaS Starter Kit logo

SaaSykit: Laravel SaaS Starter Kit

SaaSykit is a Multi-tenant Laravel SaaS Starter Kit that comes with all features required to run a modern SaaS. Payments, Beautiful Checkout, Admin Panel, User dashboard, Auth, Ready Components, Stats, Blog, Docs and more.

SaaSykit: Laravel SaaS Starter Kit
Statamic logo

Statamic

The drop-in ready Laravel CMS you’re been waiting for. Go full-stack or headless, flat file or database – it’s up to you.

Statamic
Laravel Cloud logo

Laravel Cloud

Easily create and manage your servers and deploy your Laravel applications in seconds.

Laravel Cloud
Tinkerwell logo

Tinkerwell

The must-have code runner for Laravel developers. Tinker with AI, autocompletion and instant feedback on local and production environments.

Tinkerwell
Curotec logo

Curotec

World class Laravel experts with GenAI dev skills. LATAM-based, embedded engineers that ship fast, communicate clearly, and elevate your product. No bloat, no BS.

Curotec
No Compromises logo

No Compromises

Joel and Aaron, the two seasoned devs from the No Compromises podcast, are now available to hire for your Laravel project. ⬧ Flat rate of $9500/mo. ⬧ No lengthy sales process. ⬧ No contracts. ⬧ 100% money back guarantee.

No Compromises