Polyscope - The agent-first dev environment for Laravel

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

Laravel Backup Server v4 Released as Open Source image

Laravel Backup Server v4 Released as Open Source

Read article
Laravel Health Status Package image

Laravel Health Status Package

Read article
80 Laravel Tutorials, Packages, and Resources from 2016 image

80 Laravel Tutorials, Packages, and Resources from 2016

Read article
Laravel Backup v3 is now released image

Laravel Backup v3 is now released

Read article
LoadForge logo

LoadForge

Scalable load testing for web apps & APIs. Simulate real-world traffic and identify breaking points and performance limits with powerful, scalable load tests designed for Laravel.

LoadForge
Laravel Cloud logo

Laravel Cloud

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

Laravel Cloud
Celebian logo

Celebian

Celebian is a social media marketing agency specializing in helping their clients go viral on TikTok. Whether you're looking to reach a bigger audience or gain more Tiktok followers, likes, and views, they've got you covered.

Celebian
The Certification of Competence for Laravel logo

The Certification of Competence for Laravel

A community-driven, proctored assessment across 4 levels designed to validate real-world Laravel knowledge, from Junior to mastery-level Artisan. Official Vue.js, Official Nuxt, Angular, React, JS certifications also available.

The Certification of Competence for Laravel
Harpoon: Next generation time tracking and invoicing logo

Harpoon: Next generation time tracking and invoicing

The next generation time-tracking and billing software that helps your agency plan and forecast a profitable future.

Harpoon: Next generation time tracking and invoicing
Shift logo

Shift

Running an old Laravel version? Instant, automated Laravel upgrades and code modernization to keep your applications fresh.

Shift