Download the PHP package phpsafari/health-checks without Composer
On this page you can find all versions of the php package phpsafari/health-checks. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download phpsafari/health-checks
More information about phpsafari/health-checks
Files in phpsafari/health-checks
Package health-checks
Short Description Make health checks in your laravel application
License MIT
Informations about the package health-checks
Health Checks
Add health checks to your Laravel applications with this package.
Examples
Install
First, use Composer to install this package.
After the package has been installed, go ahead and add `PhpSafari\ServiceProvider\HealthCheckServiceProvider::class to your config/app.php file.
After doing this, you can publish the health.php configuration file into your config folder by running:
Usage
Inside the config/health.php file is where you configure all your available health checks. By default, this package comes packed with a few checks already:
CorrectEnvironmentwill check if your application's environment is set toproductionDatabaseOnlinewill check your database connectionDatabaseUpToDatewill check if your application has any migrations that hasn't been migrated yetDebugModeOffwill check if debug mode is offQueueProcessingwill check if the queue is running and jobs are getting processedPathIsWritablewill check if a provided path is writableLogLevelwill check if log level is set to the given valueMaxRatioOf500Responseswill check if the ratio of 500 response are above a given threshold (The last 60 min)MaxResponseTimeAvgwill check if average response time for all request are above a given threshold (The last 60 min)
To run a health check of your application, run:
You can also use Laravel's scheduler to schedule your health checks:
Url based health checks
You can also run a health check by hitting the https://<APP_URL>/_health url in a browser or with a tool like Pingdom.
Note: _This feature can be disabled in the config/health.php file, by setting route.enabled to false.
You can navigate to https://<APP_URL>/_health/stats and get all stats, including avg response time,
Creating your own health checks
In order to create your own health checks, you just need to extend the PhpSafari\Checks\HealthCheck class and implement the run() method.
Example:
Then add new IsFriday() to the list of checks in config/health.php.
Testing
Security
If you discover any security related issues, please email :author_email instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.
All versions of health-checks with dependencies
illuminate/support Version ~5.4|~5.3
vistik/typed-collections Version ^2.0