PHPackages                             webrek/laravel-health-ui - 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. webrek/laravel-health-ui

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

webrek/laravel-health-ui
========================

A production health dashboard for Laravel: pluggable checks, a JSON endpoint for uptime monitors and a status page.

v1.1.0(2d ago)00MITPHPPHP ^8.2CI passing

Since Jun 8Pushed 2d agoCompare

[ Source](https://github.com/webrek/laravel-health-ui)[ Packagist](https://packagist.org/packages/webrek/laravel-health-ui)[ Docs](https://github.com/webrek/laravel-health-ui)[ RSS](/packages/webrek-laravel-health-ui/feed)WikiDiscussions main Synced yesterday

READMEChangelog (2)Dependencies (8)Versions (3)Used By (0)

Laravel Health UI
=================

[](#laravel-health-ui)

[![Latest Version on Packagist](https://camo.githubusercontent.com/dac3c884408a0691438eb39f3026b9438dee590588c7a50040e2cf7ecc3f60ba/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f77656272656b2f6c61726176656c2d6865616c74682d75692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/webrek/laravel-health-ui)[![Total Downloads](https://camo.githubusercontent.com/4c35a4af9e7fe94fc754ff514eb791dea37d20de0ec355663744bdc4d24835d3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f77656272656b2f6c61726176656c2d6865616c74682d75692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/webrek/laravel-health-ui)[![Tests](https://camo.githubusercontent.com/d6d8310e98e48e4621bbc545041a3f8bf8dc04d5a32eec9f65f2680020e2bb32/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f77656272656b2f6c61726176656c2d6865616c74682d75692f74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/webrek/laravel-health-ui/actions/workflows/tests.yml)[![PHP Version](https://camo.githubusercontent.com/7c34afd59d9ea07cad305f3de69b9daa6c8284e41c602a958a61dd0699f9e761/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f77656272656b2f6c61726176656c2d6865616c74682d75692e7376673f7374796c653d666c61742d737175617265)](https://php.net)[![License](https://camo.githubusercontent.com/c3e904c103ead5f93605eb7fe1d6d8e49d42eb8d1ec5323f54fb1b8918c1e4eb/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f77656272656b2f6c61726176656c2d6865616c74682d75692e7376673f7374796c653d666c61742d737175617265)](LICENSE)

A production health dashboard for Laravel. Pluggable checks (database, cache, disk, external services), a JSON endpoint your uptime monitor can poll, and a clean status page — all from one route.

Quickstart
----------

[](#quickstart)

```
composer require webrek/laravel-health-ui
```

Visit `/health` for the status page, or poll it as JSON:

```
curl -H "Accept: application/json" https://your-app.test/health
```

```
{
  "status": "ok",
  "healthy": true,
  "checks": [
    {"name": "database", "status": "ok", "message": "Connection [sqlite] is reachable.", "meta": [], "duration_ms": 0.4},
    {"name": "cache", "status": "ok", "message": "Cache read/write succeeded.", "meta": [], "duration_ms": 0.2},
    {"name": "disk_space", "status": "ok", "message": "Disk is 41% full.", "meta": {"used_percent": 41}, "duration_ms": 0.1}
  ]
}
```

The endpoint returns **200** while the app is healthy and **503** the moment a check hard-fails — exactly what an uptime monitor (Pingdom, UptimeRobot, a Kubernetes liveness probe) needs.

What you get over Laravel's `/up`
---------------------------------

[](#what-you-get-over-laravels-up)

Laravel's built-in `/up` route answers a single question: did the framework boot? That tells you nothing about whether your database is reachable, your cache is responding, the disk is filling up, or a third-party API you depend on is down. This package runs real checks, aggregates them, and shows you which one is unhealthy — on a status page and as machine-readable JSON.

Status model
------------

[](#status-model)

Each check returns one of three statuses, and the overall status is the worst of them:

StatusMeaningHTTP`ok` (Operational)Healthy200`warning` (Degraded)Working but needs attention (e.g. disk 85% full, debug mode on)200`failed` (Down)A hard failure503Warnings keep the endpoint at **200** so you are not paged for degraded-but- serving conditions — only hard failures flip it to **503**.

Built-in checks
---------------

[](#built-in-checks)

Enable and tune them in `config/health-ui.php`:

```
'checks' => [
    'database'   => ['enabled' => true, 'connection' => null],
    'cache'      => ['enabled' => true, 'store' => null],
    'disk_space' => ['enabled' => true, 'path' => null, 'warning_threshold' => 80, 'failure_threshold' => 90],
    'debug_mode' => ['enabled' => true],
    'http'       => ['enabled' => true, 'endpoints' => [
        ['name' => 'Payments API', 'url' => 'https://api.example.com/health', 'timeout' => 5],
    ]],
],
```

- **database** — runs `select 1` on the connection.
- **cache** — writes and reads back a value.
- **disk\_space** — warns/fails past the configured used-percentage thresholds.
- **debug\_mode** — warns when `APP_DEBUG` is on (a frequent production slip).
- **http** — pings each external dependency and expects a 2xx.
- **queue\_failed\_jobs** — warns/fails as the failed-jobs backlog grows.
- **schedule** — fails when the scheduler heartbeat goes stale (see below).
- **migrations** — warns when migrations are committed but not run here.
- **certificates** — warns before a host's TLS certificate expires.

### Scheduler heartbeat

[](#scheduler-heartbeat)

The `schedule` check reads a timestamp your scheduler keeps fresh. Add a frequent task that stamps it:

```
// routes/console.php (or your schedule definition)
Schedule::call(fn () => cache()->forever('health-ui:schedule-heartbeat', now()->timestamp))
    ->everyMinute();
```

The check then fails if that heartbeat is older than `max_age_minutes`.

Writing your own check
----------------------

[](#writing-your-own-check)

Implement the `Check` contract. Return a `Result`, or just throw — the checker turns an exception into a failed result automatically.

```
use Webrek\HealthUi\Contracts\Check;
use Webrek\HealthUi\Result;

class RedisQueueDepthCheck implements Check
{
    public function name(): string
    {
        return 'queue_depth';
    }

    public function run(): Result
    {
        $depth = Redis::llen('queues:default');

        return $depth < 1000
            ? Result::ok($this->name(), "Queue depth is {$depth}.", ['depth' => $depth])
            : Result::warning($this->name(), "Queue is backing up ({$depth}).", ['depth' => $depth]);
    }
}
```

Register it (e.g. in a service provider):

```
app(\Webrek\HealthUi\HealthChecker::class)->register(new RedisQueueDepthCheck);
```

Command line
------------

[](#command-line)

Run the checks from the CLI or a cron — it exits non-zero when unhealthy, so it plugs straight into deploy gates and alerting:

```
php artisan health:check
```

Configuration highlights
------------------------

[](#configuration-highlights)

```
'route' => env('HEALTH_UI_ROUTE', 'health'),

// Protect the endpoint — it can expose internal details.
'middleware' => [],

// Cache the report so frequent polls don't run every check each hit.
'cache' => ['ttl' => 0, 'store' => null, 'key' => 'health-ui.report'],
```

Publish the config and views to customise them:

```
php artisan vendor:publish --tag=health-ui-config
php artisan vendor:publish --tag=health-ui-views
```

> The endpoint can reveal internal state. In production, put it behind `middleware` (a token, a signed URL, or an internal-network restriction).

Requirements
------------

[](#requirements)

ComponentVersionPHP8.2+Laravel12.xTesting
-------

[](#testing)

```
composer install
composer test
```

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

[](#contributing)

See [CONTRIBUTING.md](CONTRIBUTING.md).

Security
--------

[](#security)

Please review the [security policy](SECURITY.md) before reporting a vulnerability.

License
-------

[](#license)

The MIT License (MIT). See [LICENSE](LICENSE).

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance99

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity47

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

Total

2

Last Release

2d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7d8deca81629993819087597b5ad7695976b02e3d014f038e26e985f35f569de?d=identicon)[webrek](/maintainers/webrek)

---

Top Contributors

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

---

Tags

health-checklaravellaravel-packagemonitoringphpstatus-pageuptimelaravelmonitoringhealthlaravel-packageobservabilityhealthcheckhealth checkstatus pageuptime

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/webrek-laravel-health-ui/health.svg)

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

###  Alternatives

[spatie/laravel-health

Monitor the health of a Laravel application

88011.3M149](/packages/spatie-laravel-health)[psalm/plugin-laravel

Psalm plugin for Laravel

3325.1M337](/packages/psalm-plugin-laravel)[laravel/ai

The official AI SDK for Laravel.

9782.1M153](/packages/laravel-ai)[inspector-apm/inspector-laravel

Code Execution Monitoring, built for developers.

2362.1M4](/packages/inspector-apm-inspector-laravel)[muhammadsadeeq/laravel-activitylog-ui

A beautiful, modern UI for Spatie's Activity Log with advanced filtering, analytics, and real-time features.

17614.3k](/packages/muhammadsadeeq-laravel-activitylog-ui)

PHPackages © 2026

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