Looking to hire Laravel developers? Try LaraJobs

laravel-health-check maintained by jmrashed

Description
Advanced Laravel package for health check and performance monitoring
Last update
2024/10/09 11:25 (dev-main)
License
Links
Downloads
3

Comments
comments powered by Disqus

Laravel Health Check

Latest Version on Packagist Total Downloads

Advanced Laravel package for health check and performance monitoring.

Table of Contents

Installation

You can install the package via Composer:

composer require jmrashed/laravel-health-check

After installing, publish the configuration file:

php artisan vendor:publish --provider="Jmrashed\HealthCheck\HealthCheckServiceProvider"

Usage

Configuration

Modify the configuration file located at config/health-check.php to customize your health check settings.

Running Health Checks

You can run health checks manually using the command:

php artisan health:check

You can also set up a scheduled command to automate this.

Logging Health Checks

Health check results are logged in the database. You can view logs by visiting:

/health-check/logs

This will display all the health check logs for monitoring and debugging.

Notifications

Set up notifications to get alerted when a health check fails. Notifications can be configured in the HealthCheckNotification class.

Middleware

You can apply the health check middleware to your routes to ensure they are always monitored:

Route::middleware('health.check')->group(function () {
    // Your routes
});

Testing

Run the tests using PHPUnit:

vendor/bin/phpunit

Make sure to set up your testing environment according to Laravel’s testing guidelines.

Contributing

Contributions are welcome! Please open an issue or submit a pull request on GitHub.

License

This package is licensed under the MIT License. See the LICENSE file for details.