PHPackages                             pandtit/health\_check - 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. pandtit/health\_check

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

pandtit/health\_check
=====================

A configurable health check endpoint for Laravel with IP whitelist support.

v0.1.4(8mo ago)152MITPHPPHP ^7.1.3|^7.2|^7.3|^7.4CI passing

Since Jul 30Pushed 7mo agoCompare

[ Source](https://github.com/pandtit/health_check)[ Packagist](https://packagist.org/packages/pandtit/health_check)[ RSS](/packages/pandtit-health-check/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (8)Versions (7)Used By (0)

Laravel Health Check
====================

[](#laravel-health-check)

[![Latest Version on Packagist](https://camo.githubusercontent.com/34b65f636bd30a193eabea4944bcfafd8e86351f692043a90e79afbfc7b4f5f4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f70616e647469742f6865616c74685f636865636b2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/pandtit/health_check)[![run-tests](https://github.com/pandtit/health_check/actions/workflows/php.yml/badge.svg)](https://github.com/pandtit/health_check/actions/workflows/php.yml)[![Check & fix styling](https://github.com/pandtit/health_check/actions/workflows/dependency-review.yml/badge.svg)](https://github.com/pandtit/health_check/actions/workflows/dependency-review.yml)[![Total Downloads](https://camo.githubusercontent.com/5cd909978f0a2af6c7d105eb3736e242126f5daa217987465cdb566f0323fd47/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f70616e647469742f6865616c74685f636865636b2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/pandtit/health_check)

Laravel Health Check: Monitors database/cache/queue connectivity with IP whitelist security, providing real-time status checks via API endpoints.

Laravel 健康监控包：通过 API 端点实时监测数据库/缓存/队列的连通性状态，支持 IP 白名单访问控制，确保关键服务可用性。

Installation
------------

[](#installation)

```
# 安装包
composer require Pandtit/health_check
```

publish config
--------------

[](#publish-config)

```
php artisan vendor:publish --provider="Pandtit\HealthCheck\HealthCheckServiceProvider" --tag="config"
```

Environment Configuration
-------------------------

[](#environment-configuration)

You can configure via `.env`:

```
# 启用健康检查
HEALTH_CHECK_ENABLED=true

# 允许访问检查接口的IP,逗号分隔
HEALTH_CHECK_IPS=127.0.0.1,192.168.1.0/24,10.0.0.1

# 允许支持代理
HEALTH_CHECK_IPS_ALLOW_PROXY=false

# 是否检查更多
HEALTH_CHECK_DB_ENABLED=false
HEALTH_CHECK_CACHE_ENABLED=false
HEALTH_CHECK_QUEUE_ENABLED=false

# 是否记录日志，默认开启
HEALTH_CHECK_LOG_ENABLED=true

# 是否开启频次限制，默认开启
HEALTH_CHECK_RATE_LIMIT_ENABLED=true
HEALTH_CHECK_MAX_ATTEMPTS=60
HEALTH_CHECK_DECAY_MINUTES=1
```

usage
-----

[](#usage)

access: get
========================================

[](#access-get-httpyour-appapihealth)

healthy
-------

[](#healthy)

simple
------

[](#simple)

```
{
    "errcode": 0,
    "errmsg": null,
    "status": "healthy",
    "data": [],
    "at": "2025-07-30T02:12:32.063030Z",
    "service": "your_app"
}
```

### multiple

[](#multiple)

```
{
    "errcode": 0,
    "errmsg": null,
    "status": "healthy",
    "data": {
        "database": "healthy",
        "cache": "healthy",
        "queue": "healthy"
    },
    "at": "2025-07-29T04:03:21.436347Z",
    "service": "your_app"
}
```

unhealty
--------

[](#unhealty)

```
{
    "errcode": 0,
    "errmsg": "Queue check failed",
    "status": "unhealthy",
    "data": {
        "database": "unhealthy",
        "cache": "unhealthy",
        "queue": "unhealthy"
    },
    "at": "2025-07-29T06:41:07.036335Z",
    "service": "your_app"
}
```

not in ip
=========

[](#not-in-ip)

```
status 403

```

```
{"errcode":403,"errmsg":"Forbidden"}
```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance62

Regular maintenance activity

Popularity10

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity30

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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

Every ~5 days

Total

5

Last Release

266d ago

PHP version history (2 changes)v0.1PHP ^7.4

v0.1.2PHP ^7.1.3|^7.2|^7.3|^7.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/1e51d1a394fdd256e8c1808fd488b470d988c94e9414aeb55334e157249346ac?d=identicon)[pandtit](/maintainers/pandtit)

---

Top Contributors

[![pandtit](https://avatars.githubusercontent.com/u/223582307?v=4)](https://github.com/pandtit "pandtit (18 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/pandtit-health-check/health.svg)

```
[![Health](https://phpackages.com/badges/pandtit-health-check/health.svg)](https://phpackages.com/packages/pandtit-health-check)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3274.9M308](/packages/psalm-plugin-laravel)[watson/active

Laravel helper for recognising the current route, controller and action

3253.6M14](/packages/watson-active)[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k12.1M99](/packages/laravel-pulse)[proengsoft/laravel-jsvalidation

Validate forms transparently with Javascript reusing your Laravel Validation Rules, Messages, and FormRequest

1.1k2.3M49](/packages/proengsoft-laravel-jsvalidation)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[anahkiasen/former

A powerful form builder

1.4k1.4M14](/packages/anahkiasen-former)

PHPackages © 2026

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