meysam-znd/laravel_health_check
最新稳定版本:1.1.1
Composer 安装命令:
composer require meysam-znd/laravel_health_check
包简介
By using this package you can monitor the health of your application
README 文档
README
Version Compatibility
| Releases | Laravel |
|---|---|
| 1.x | ^8.22.1; ^9.3.0 |
Install
composer require meysam-znd/laravel_health_check
Publish Config
php artisan vendor:publish --provider="Laravel\Health\Providers\HealthServiceProvider"
Usage
Edit the config file config/health-checker.php see the comments there for more information
Available checkers
databaseTests database connections.cacheTests for caching datadirectory-permissionTests permission in directoriesqueueTests for queue
How to add a new checker
You only need to extend \Laravel\Health\Checkers\BaseChecker and add to services in config/health-checker.php.
Routes and Responses
To access the health status you can use the follow routes:
health/statusLoad and list all check services.health/{service_name}/statusLoad only the chosen service and show his status.
The response for both cases will be like that:
{
status => false
health_status: [
{
cache: {
status: true,
message: null
}
},
{
database: {
status: true,
message: null
}
},
{
directory-permission: {
status: false,
message: "The directory /application/public/../storage/ is not writable."
}
},
{
queue: {
status: true,
message: null
}
}
]
}
Command usage
You can use the follow commands to check healthy in your cli application:
php artisan application-health:check-health
Or
php artisan application:health-check
Note: this package was made a fork from https://github.com/arquivei/laravel-health-checker
统计信息
- 总下载量: 25
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-11-08