PHPackages                             gouh/psr-health - 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. gouh/psr-health

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

gouh/psr-health
===============

It is a handler to be able to know if there are certain connections such as cache, database and some external endpoints

1.0.0(4y ago)16MITPHPPHP ^7.3 || ~8.0.0

Since May 17Pushed 4y ago1 watchersCompare

[ Source](https://github.com/gouh/psr-health)[ Packagist](https://packagist.org/packages/gouh/psr-health)[ RSS](/packages/gouh-psr-health/feed)WikiDiscussions master Synced 3d ago

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

Psr Health
==========

[](#psr-health)

It is a handler to be able to know if there are certain connections such as cache, database and some external endpoints

### Built With

[](#built-with)

- [PHP](https://www.php.net)
- [Container interface](https://github.com/php-fig/container)

### Config

[](#config)

If you use config aggregator add next line in the array

```
PsrHealth\ConfigProvider::class
```

If you use only psr container add next line in your factories

```
\PsrHealth\Health::class => \PsrHealth\HealthFactory::class
```

Config for psr-health, add an array like this in the project config

```
    'health' => [
        'mongo' => [
            'host' => 'local-mongo-44',
            'port' => 27017,
            'database' => 'local',
            'collection' => 'startup_log',
            'user' => 'admin',
            'password' => 'admin'
        ],
        'mysql' => [
            'host' => 'local-mysql-57',
            'port' => 3306,
            'database' => 'credit',
            'user' => 'hangouh',
            'password' => 'secret2'
        ],
        'redis' => [
            'host' => 'local-redis',
            'port' => 6379,
            'password' => 'password'
        ],
        'endpoint' => [
            'webhook' => [
                'url' => 'https://webhook.site/e8dc7d50-6985-4345-81d1-b45c30601403',
                'custom_headers' => [
                    'Authorization: Basic YWxhZGRpbjpvcGVuc2VzYW1l'
                ]
            ],
            'hangouh' => 'https://hangouh.me'
        ]
    ]
```

You can confgure only what you require

```
    'health' => [
        'mysql' => [
            'host' => 'local-mysql-57',
            'port' => 3306,
            'database' => 'credit',
            'user' => 'hangouh',
            'password' => 'secret2'
        ],
        'redis' => [
            'host' => 'local-redis',
            'port' => 6379,
            'password' => 'password'
        ]
    ]
```

### Usage

[](#usage)

Get Health class from your container and inject in your class

```
$health = $container->get(Health::class);
```

The class has multiple connection tests you can use each one or together

```
$health->redisConnection();
$health->mysqlConnection();
$health->mongoConnection();
$health->endpointConnection();
# Or you can use
$health->getHealthStatus();
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

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

Unknown

Total

1

Last Release

1820d ago

### Community

Maintainers

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

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/gouh-psr-health/health.svg)

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

###  Alternatives

[spatie/flare-client-php

Send PHP errors to Flare

177148.0M15](/packages/spatie-flare-client-php)[neeckeloo/newrelic

NewRelic module for Laminas

32207.2k](/packages/neeckeloo-newrelic)[nikolaposa/monolog-factory

Configuration-based Monolog factory

25226.9k2](/packages/nikolaposa-monolog-factory)

PHPackages © 2026

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