PHPackages                             mattyeend/health-status - 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. [Logging &amp; Monitoring](/categories/logging)
4. /
5. mattyeend/health-status

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

mattyeend/health-status
=======================

Laravel package to check database, ping, queue, cron, and disk health.

v1.1.8(2mo ago)16MITPHPPHP &gt;=8.1

Since Aug 12Pushed 2mo agoCompare

[ Source](https://github.com/MatthewYeend/Health-Status)[ Packagist](https://packagist.org/packages/mattyeend/health-status)[ Fund](https://www.buymeacoffee.com/mattyeend)[ GitHub Sponsors](https://github.com/MattYeend)[ RSS](/packages/mattyeend-health-status/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (7)Dependencies (3)Versions (11)Used By (0)

Laravel HealthStatus
====================

[](#laravel-healthstatus)

A Laravel package to monitor application health, including:

- Database connection &amp; latency
- Ping status for external hosts
- Queue sizes
- Cron heartbeat
- Disk space

Supports **Laravel 10, 11, and 12**.

---

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

[](#installation)

Require the package via Composer:

```
composer require MattYeend/health-status
```

---

Publish Config &amp; Views
--------------------------

[](#publish-config--views)

```
php artisan vendor:publish --provider="MattYeend\HealthStatus\HealthStatusServiceProvider" --tag=config
php artisan vendor:publish --provider="MattYeend\HealthStatus\HealthStatusServiceProvider" --tag=views
```

---

Configuration
-------------

[](#configuration)

The published file `config/healthstatus.php` contains:

- Hosts to ping
- Queues to check
- Cron heartbeat settings
- Disk space thresholds
- Database response time thresholds
- HTTP endpoint settings
- Middleware for endpoint protection Example:

```
'pings' => [
    [
        'name' => 'google',
        'host' => '8.8.8.8',
        'port' => 53,
        'timeout' => 2,
    ],
],
```

---

Health Endpoint
---------------

[](#health-endpoint)

By default:

- Web view: `/healthstatus`
- JSON: `/healthstatus/json`You can change `http.endpoint` in `config/healthstatus.php.`

---

Cron Heartbeat
--------------

[](#cron-heartbeat)

### In Laravel 10, 11

[](#in-laravel-10-11)

Add to `app/Console/Kernel.php`:

```
protected function schedule(Schedule $schedule): void
{
    $schedule->command('healthstatus:cron-heartbeat')->everyMinute();
}
```

### In Laravel 12

[](#in-laravel-12)

Add to `routes/console.php`:

```
use Illuminate\Support\Facades\Schedule;

Schedule::command('healthstatus:cron-heartbeat')->everyMinute();
```

---

Then make sure your server runs Laravel’s scheduler:

```
* * * * * php /path/to/artisan schedule:run >> /dev/null 2>&1
```

---

Example Output
--------------

[](#example-output)

JSON

```
{
  "status": "ok",
  "checks": {
    "database": { "status": "ok", "response_time_ms": 15.3, "connection": "mysql" },
    "pings": { "status": "ok", "hosts": { "google": { "status": "ok" } } },
    "queues": { "status": "ok", "queues": { "default": { "status": "ok", "size": 0 } } },
    "cron": { "status": "ok", "last_run": "2025-08-12T15:20:00Z", "age_seconds": 10 },
    "disks": { "status": "ok", "disks": { "root": { "status": "ok", "free_percent": 75.1 } } }
  },
  "timestamp": "2025-08-12T15:20:10Z"
}
```

---

Securing the Endpoint
---------------------

[](#securing-the-endpoint)

Add middleware in `config/healthstatus.php`:

```
'middleware' => ['auth.basic'],
```

---

Testing
-------

[](#testing)

Run the included tests:

```
vendor/bin/phpunit
```

---

License
-------

[](#license)

This package is licensed under the MIT License.

---

Contributing
------------

[](#contributing)

Feel free to fork the repository and submit pull requests for improvements or new features!

###  Health Score

40

—

FairBetter than 88% of packages

Maintenance87

Actively maintained with recent releases

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 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 ~30 days

Recently: every ~52 days

Total

8

Last Release

65d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/280b020ca627b367261832c86f63f9f71076d720e1f8e6c4a7ae2c9c1a77f39e?d=identicon)[MattYeend](/maintainers/MattYeend)

---

Top Contributors

[![MattYeend](https://avatars.githubusercontent.com/u/23270321?v=4)](https://github.com/MattYeend "MattYeend (9 commits)")

---

Tags

composercomposer-packagehealthhealth-statuslaravellaravel-10laravel-11laravel-12laravel-frameworklaravel-packagelaravel10laravel11laravel12packagephpstatuslaravelhealthpackagestatushealth-status

### Embed Badge

![Health badge](/badges/mattyeend-health-status/health.svg)

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

PHPackages © 2026

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