PHPackages                             amazeeio/healthz-php - 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. amazeeio/healthz-php

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

amazeeio/healthz-php
====================

v0.0.7(9mo ago)14.1k↓50%[3 PRs](https://github.com/amazeeio/healthz-php/pulls)Apache-2.0PHP

Since Jun 18Pushed 1mo ago4 watchersCompare

[ Source](https://github.com/amazeeio/healthz-php)[ Packagist](https://packagist.org/packages/amazeeio/healthz-php)[ RSS](/packages/amazeeio-healthz-php/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (8)Versions (13)Used By (0)

Healthz PHP
===========

[](#healthz-php)

This is a simple PHP app used to determine the overall health of a site hosted on Lagoon.

As it stands, it relies on Lagoon conventions to determine which services are available and then checks if the services are up.

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

[](#configuration)

This script should reside in a directory separate from the application that is being hosted. For instance, the convention is that a webapp is stored in `/app` - you could store Healthz-php in `/healthz`.

```
  location /lagoonhealthz {
    root /lagoonhealthz;
    rewrite ^/lagoonhealthz$ /lagoonhealthz/index.php;

    location ~* \.php(/|$) {
      include        /etc/nginx/fastcgi.conf;
      fastcgi_param  SCRIPT_NAME        /index.php;
      fastcgi_param  SCRIPT_FILENAME    /lagoonhealthz/index.php;
      fastcgi_pass   ${NGINX_FASTCGI_PASS:-php}:9000;
    }
  }

```

Adding this to your nginx configuration will reroute all incoming traffic on `/healthz`to our current script.

### Setting failure response code

[](#setting-failure-response-code)

By default, we return an http 500 response code for any failed checks. This can be a potential problem for setups that involve negative caching of errors.

If you would like to have the system return something other than a 500, you can set the environment variable `HEALTHZ_PHP_HTTP_FAIL_CODE` with the return code.

Extending checks
----------------

[](#extending-checks)

Checks can be created by implementing `AmazeeIO\Health\Check\CheckInterface`which principally does two things.

First, it checks whether the check is actually applicable in the present environment. For example, to know whether it should be checking the status of the Solr service, the `CheckSolr` class will first check whether the environment variable `SOLR_PORT` is available. If the CheckInterface::appliesInEnvironment call to any particular check returns `true`that check will be registered to run.

Second, all applicable checks are required to return both a `result` and a `status`. The `status` returns one of `STATUS_PASS` `STATUS_FAIL` and `STATUS_WARN` - These three statuses really determine the health of the service under test. They're used to determine health of the overall system.

The status of the check as a whole is determined by the *most negative* applicable check's result. That is, if any one of the checks return a `STATUS_FAIL`, the entire check is considered to have failed. If any one check returns a `STATUS_WARN`, the entire system check is considered to be in a warning state.

When you have created your checks you register them in the `checks.conf.php` file.

###  Health Score

42

—

FairBetter than 90% of packages

Maintenance74

Regular maintenance activity

Popularity22

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity52

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

Recently: every ~465 days

Total

7

Last Release

291d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f7e53a12a16b6d51d24db4fcdc219f63870874a0c430634eb300e32ad38db559?d=identicon)[amazeeio](/maintainers/amazeeio)

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/amazeeio-healthz-php/health.svg)

```
[![Health](https://phpackages.com/badges/amazeeio-healthz-php/health.svg)](https://phpackages.com/packages/amazeeio-healthz-php)
```

###  Alternatives

[w7corp/easywechat

微信SDK

10.4k761.6k60](/packages/w7corp-easywechat)[illuminate/session

The Illuminate Session package.

9937.4M753](/packages/illuminate-session)[wallabag/wallabag

open source self hostable read-it-later web application

12.6k2.2k](/packages/wallabag-wallabag)[jaxon-php/jaxon-core

Jaxon is an open source PHP library for easily creating Ajax web applications

73142.3k25](/packages/jaxon-php-jaxon-core)[fisharebest/webtrees

webtrees online genealogy

73710.5k13](/packages/fisharebest-webtrees)[illuminate/reflection

The Illuminate Reflection package.

371.6M3](/packages/illuminate-reflection)

PHPackages © 2026

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