HealthCheck provides your Laravel application with a /healthcheck
endpoint to make it easier nice and easy to view the status of your application.
supports package auto discovery for Laravel
Via Composer
$ composer require io-digital/health-check
Add the ServiceProvider to your config/app.php providers array:
IoDigital\HealthCheck\HealthCheckServiceProvider::class,
Then run the following command artisan command:
$ php artisan vendor:publish --provider="IoDigital\HealthCheck\HealthCheckServiceProvider"
This will publish the package config file to config/healthcheck.php
.
You currently have the options to select which tests to perform:
'ssl' => true,
'database' => true,
'application' => true,
//System information
'memory' => false,
'cpu_usage' => false,
The package automatically adds the /healthcheck
endpoint to your application. All you need to do is hit that route.
For now the endpoint returns the following:
200
reponse- JSON object with the following layout:
{
"application": {
"message": "Application is running",
"success": true
},
"database": {
"message": "There was an error connecting to the database. Error has been logged.",
"success": false
},
"ssl": {
"message": "SSL is working.",
"success": true
}
}
Future releases will hope to expand on what is tested.
Please see CHANGELOG for more information on what has changed recently.
$ composer test
Please see CONTRIBUTING and CONDUCT for details.
If you discover any security related issues, please email :author_email instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.