Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/brightfish-be/health-checks
Generic health check package for Laravel
https://github.com/brightfish-be/health-checks
Last synced: about 14 hours ago
JSON representation
Generic health check package for Laravel
- Host: GitHub
- URL: https://github.com/brightfish-be/health-checks
- Owner: brightfish-be
- License: gpl-3.0
- Created: 2021-05-11T08:45:07.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-04-13T16:37:20.000Z (over 1 year ago)
- Last Synced: 2024-10-28T22:11:55.877Z (18 days ago)
- Language: PHP
- Homepage:
- Size: 79.1 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE.md
- Security: .github/SECURITY.md
Awesome Lists containing this project
README
# Health checks for Laravel & Lumen
[![Tests](https://github.com/brightfish-be/health-checks/actions/workflows/run-tests.yml/badge.svg?style=flat-square&label=Tests)](https://github.com/brightfish-be/health-checks/actions/workflows/run-tests.yml)
[![Latest Version on Packagist](https://img.shields.io/packagist/v/brightfish/health-checks.svg?style=flat-square&label=Version)](https://packagist.org/packages/brightfish/health-checks)
[![Total Downloads](https://img.shields.io/packagist/dt/brightfish/health-checks.svg?label=Downloads&style=flat-square)](https://packagist.org/packages/brightfish/health-checks)## Usage
Run all your registered checks from the command line:
```php
php artisan health:check
```Or make a HTTP request to the built-in `health` endpoint:
```bash
curl GET https://your.app/health
```## Installation
Install the package with composer:
```bash
composer require brightfish/health-checks
```Publish the config file:
```bash
php artisan vendor:publish --provider="Brightfish\HealthChecks\HealthServiceProvider" --tag="health-checks-config"
```Create a custom health check class:
```php
namespace App\Health\MyCustomCheck;class MyCustomCheck extends \Brightfish\HealthChecks\Checks\AbstractCheck
{
public function run(): bool
{
return false;
}public function getMessage(): string
{
return 'Error';
}
}
```Finally, list up the class in the config file:
```php
return [
'checks' => [
\App\Health\MyCustomCheck::class,
],
];
```## Testing
```bash
composer test
```## Contributing
Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.## Security Vulnerabilities
Please review [our security policy](../../security/policy) on how to report security vulnerabilities.## Credits
- [Brightfish](https://github.com/brightfish-be)
- [All Contributors](../../contributors)## License
GNU General Public License (GPL). Please see [License File](LICENSE.md) for more information.