PHPackages                             fullpipe/check-them - 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. fullpipe/check-them

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

fullpipe/check-them
===================

Health checks for external services

1.0.1(5y ago)328.9k1MITPHPPHP &gt;=7.2.0

Since Nov 8Pushed 5y ago1 watchersCompare

[ Source](https://github.com/fullpipe/check-them)[ Packagist](https://packagist.org/packages/fullpipe/check-them)[ RSS](/packages/fullpipe-check-them/feed)WikiDiscussions main Synced 4d ago

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

Health checks for external services
===================================

[](#health-checks-for-external-services)

Install
-------

[](#install)

```
composer require fullpipe/check-them
```

Usage
-----

[](#usage)

```
use Fullpipe\CheckThem\Checks\PDOCheck;

$mysqlCheck = new PDOCheck('mysql:dbname=test_db;host=127.0.0.1:3306', 'username', 'password');
$status = $mysqlCheck->getStatus();

if(!$status->isUp()) {
    $this->logger->warn('Mysql server is down', $status->getError());
    exit;
}
```

or use AllInOneCheck

```
use Fullpipe\CheckThem\Checks\AllInOneCheck;
use Fullpipe\CheckThem\Checks\PDOCheck;
use Fullpipe\CheckThem\Checks\HttpCheck;
use Fullpipe\CheckThem\Checks\RedisChecker;

...

$allInOne = new AllInOneCheck();

$allInOne->add(new PDOCheck('mysql:dbname=test_db;host=127.0.0.1:3306', 'username', 'password'));
$allInOne->add(new HttpCheck('user_service:8080'));
$allInOne->add(new RedisChecker('redis:6379'));

$status = $allInOne->getStatus();

if(!$status->isUp()) {
    $this->logger->warn('Something is down', $status->getError());
    exit;
}

// everything is fine
```

Available checks
----------------

[](#available-checks)

### PDOCheck

[](#pdocheck)

It is just a simple wrapper over [php.PDO](https://www.php.net/manual/en/book.pdo.php). It has the same constructor signature as the `PDO` class. In theory, it works with all [PDO drivers](https://www.php.net/manual/en/pdo.drivers.php), but was tested only against MySQL and Postgres.

#### Examples

[](#examples)

```
use Fullpipe\CheckThem\Checks\PDOCheck;

...

$mysqlCheck = new PDOCheck('mysql:dbname=test_db;host=127.0.0.1:3306', 'username', 'password');
$pgCheck = new PDOCheck('pgsql:host=localhost;port=8002;dbname=test_db', 'username', 'password');
```

### HttpCheck

[](#httpcheck)

Check external service by http request. To be `up` service should respond with `200` http code.

#### Examples

[](#examples-1)

```
use Fullpipe\CheckThem\Checks\HttpCheck;

...

$userCheck = new HttpCheck('http://user_service:8080/healthz');
$webCheck = new HttpCheck('https://google.com/');
```

#### Config

[](#config)

```
$check = (new HttpCheck('http://user_service:8080/healthz'))
    ->setConnectionTimeout(3) // change connection timeout, default 1 second
    ;
```

### RedisCheck

[](#redischeck)

Checks redis server with `PING` -&gt; `PONG` request.

#### Examples

[](#examples-2)

```
use Fullpipe\CheckThem\Checks\RedisCheck;

...

$check = new RedisCheck('tcp://10.0.0.1:6379');
$check = new RedisCheck('unix:/path/to/redis.sock');
```

#### Config

[](#config-1)

```
$check = (new RedisCheck('redis:6379'))
    ->setAuth('test_pass') // use password if required
    ->setConnectionTimeout(4) // timeout for server connection, default 1 second
    ->setStreamTimeout(3) // timeout for socket read/write operations, default 1 second
    ;
```

### PredisCheck

[](#predischeck)

If you already work with redis using [predis](https://github.com/predis/predis). You could use predis client for `PING` check.

#### Examples

[](#examples-3)

```
use Fullpipe\CheckThem\Checks\PredisCheck;

...

$client = new Predis\Client([
    'scheme' => 'tcp',
    'host'   => '10.0.0.1',
    'port'   => 6379,
]);
$check = new PredisCheck($client);
```

### SocketCheck

[](#socketcheck)

Connects to service and waits for single char from service over a socket connection.

#### Examples

[](#examples-4)

```
use Fullpipe\CheckThem\Checks\SocketCheck;

...

// you could use this check for mysql,
// it work fine and you don't need a password
$check = new SocketCheck('mysql:3306');
```

#### Config

[](#config-2)

```
$check = (new SocketCheck('mysql:3306'))
    ->setConnectionTimeout(4) // timeout for server connection, default 1 second
    ->setStreamTimeout(3) // timeout for socket read/write operations, default 1 second
    ;
```

### SocketConnectionCheck

[](#socketconnectioncheck)

Checks only that socket connection is working. It is not the check that you could rely on.

#### Examples

[](#examples-5)

```
use Fullpipe\CheckThem\Checks\SocketConnectionCheck;

...

$check = new SocketConnectionCheck('rabbitmq:5672');
```

#### Config

[](#config-3)

```
$check = (new SocketConnectionCheck('mysql:3306'))
    ->setConnectionTimeout(4) // timeout for server connection, default 1 second
    ;
```

### AllInOneCheck

[](#allinonecheck)

Checks all children to be available.

#### Examples

[](#examples-6)

```
use Fullpipe\CheckThem\Checks\AllInOneCheck;
use Fullpipe\CheckThem\Checks\SocketCheck;
use Fullpipe\CheckThem\Checks\RedisCheck;

...

$check = (new AllInOneCheck())
    ->add(new SocketCheck('mysql:3306'))
    ->add((new RedisCheck('tcp://10.0.0.1:6379'))->setAuth('redisPass'))
    ;
```

Test
----

[](#test)

```
composer install
docker-compose -f tests/docker-compose.yml up -d
./vendor/bin/phpunit
```

or if you want to play with service availability

```
docker-compose -f tests/docker-compose.yml up -d
php ./tests/realtime_test.php
docker-compose -f tests/docker-compose.yml restart mysql57
```

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity31

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity50

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

Total

2

Last Release

1893d ago

### Community

Maintainers

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

---

Top Contributors

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

---

Tags

k8shealth checkhealthz

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

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

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

###  Alternatives

[swlib/util

Swlib Toolkit

11144.6k3](/packages/swlib-util)

PHPackages © 2026

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