PHPackages                             tiacx/laravel-health-plus - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. tiacx/laravel-health-plus

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

tiacx/laravel-health-plus
=========================

Laravel-Health-Plus

1.0.0(yesterday)01↑2900%MITPHPPHP &gt;=8.0.0

Since Jun 18Pushed yesterdayCompare

[ Source](https://github.com/Tiacx/laravel-health-plus)[ Packagist](https://packagist.org/packages/tiacx/laravel-health-plus)[ Docs](https://github.com/tiacx/laravel-health-plus)[ RSS](/packages/tiacx-laravel-health-plus/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

Laravel Health Plus
===================

[](#laravel-health-plus)

说明
--

[](#说明)

[spatie/laravel-health](https://spatie.be/docs/laravel-health/v1/introduction) 的增强扩展包，为你的 Laravel 应用提供额外的健康检查与通知功能。

安装
--

[](#安装)

```
composer require tiacx/laravel-health-plus
```

配置
--

[](#配置)

#### 发布配置文件：

[](#发布配置文件)

```
php artisan vendor:publish --tag=health-plus-config
```

该命令会发布 `config/health.php` 配置文件。

#### 配置检查项：

[](#配置检查项)

发布配置后，修改 `config/health.php` 中的 `checks` 数组来启用或配置你需要的检查项。

```
// config/health.php
'checks' => [
    DatabaseCheck::new(),
    RedisCheck::new(),
    UsedDiskSpaceCheck::new()
        ->warnWhenUsedSpaceIsAbovePercentage(85)
        ->failWhenUsedSpaceIsAbovePercentage(95),
    DatabaseConnectionCountCheck::new()
        ->warnWhenMoreConnectionsThan(2000)
        ->failWhenMoreConnectionsThan(5000),
    CpuLoadCheck::new()
        ->warnWhenLoadIsIncreasing(3.0) // 系统负载剧增超过3倍
        ->topProcessesLimit(5), // Top5 进程
    RequestCheck::new()
        ->warnWhenRpsIsIncreases(3) // 每秒请求数剧增超过3倍
        ->warnWhenDurationIsIncreases(10), // 请求响应时间剧增超过10倍
    PhpFpmCheck::new()
        ->statusUrl('http://localhost/fpm-status')
        ->warnWhenActiveProcessesIsAbovePercentOfMaxChildren(80)
        ->failWhenActiveProcessesIsAbovePercentOfMaxChildren(95)
        ->warnWhenListenQueueIsAbove(5)
        ->failWhenListenQueueIsAbove(10)
        ->warnWhenSlowRequestsIsAbove(5)
        ->failWhenSlowRequestsIsAbove(10),
    LogCheck::new()
        ->failWhenErrorLogsAbove(0) // 有错误日志
        ->warnWhenWarningLogsIsAbove(100) // 警告日志超过100条
        ->everyFifteenMinutes(), // 15分钟一次
],
```

#### 配置通知：

[](#配置通知)

发布配置后，修改 `config/health.php` 中的 `notifications` 数组来启用或配置你需要的通知方式，默认使用 `webhook` 通知

```
'notifications' => [
    'enabled' => true,
    'notifications' => [
        HealthCheckNotification::class => ['webhook'],
    ],
    'notifiable' => HealthCheckNotifiable::class,
    'webhook' => [
        'url' => env('HEALTH_NOTIFICATION_WEBHOOK_URL', ''),
    ],
],
```

注：通过 `HEALTH_NOTIFICATION_WEBHOOK_URL` 环境变量来配置 Webhook URL。

#### 其他可用 `Check` 类：

[](#其他可用-check-类)

迁移
--

[](#迁移)

```
php artisan vendor:publish --tag="health-migrations"
```

```
php artisan migrate
```

使用
--

[](#使用)

手动运行健康检查：

```
php artisan health:check
```

定时运行健康检查：

`app/Console/Kernel.php` 中添加以下代码：

```
$schedule->command(RunHealthChecksCommand::class)->everyMinute();
```

或者在 `routes/console.php` 中添加以下代码：

```
Schedule::command(RunHealthChecksCommand::class)->everyMinute();
```

更多说明
----

[](#更多说明)

请参考 [spatie/laravel-health 官方文档](https://spatie.be/docs/laravel-health/v1/introduction)。

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance100

Actively maintained with recent releases

Popularity2

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3c173a7dad73458dd950276c67531a52ade5769c14c48218fa2a9e02416c4835?d=identicon)[Tiacx](/maintainers/Tiacx)

---

Tags

laravellaravel-healthlaravel-health-plus

### Embed Badge

![Health badge](/badges/tiacx-laravel-health-plus/health.svg)

```
[![Health](https://phpackages.com/badges/tiacx-laravel-health-plus/health.svg)](https://phpackages.com/packages/tiacx-laravel-health-plus)
```

###  Alternatives

[spatie/statamic-health

Check the health of your Statamic app

115.3k](/packages/spatie-statamic-health)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
