PHPackages                             oniva/flow-healthstatus - 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. oniva/flow-healthstatus

ActiveNeos-package[Logging &amp; Monitoring](/categories/logging)

oniva/flow-healthstatus
=======================

Flow Framework package to check the health status of you application

1.0.0(7mo ago)010MITPHP

Since Sep 15Pushed 7mo agoCompare

[ Source](https://github.com/onivaevents/flow-healthstatus)[ Packagist](https://packagist.org/packages/oniva/flow-healthstatus)[ RSS](/packages/oniva-flow-healthstatus/feed)WikiDiscussions main Synced 1mo ago

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

Oniva.Flow.HealthStatus
=======================

[](#onivaflowhealthstatus)

Package to check the health status of a flow application.

It's extremly useful in a kubernetes environment to use with [readiness and liveness probe](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/)to determine if a pod can serve traffic and if it is still alive.

Usage
-----

[](#usage)

To determine the current health status of your application you can check wether the app is ready or still alive.

### Readiness

[](#readiness)

Simply execute the flow command `./flow app:isready`.

This will execute all tests defined in the `Oniva.Flow.HealthStatus.testChain` of the Settings.yaml. If all tests have passed, the `readyChain` tasks will be executed.

After a successfully run of the `readyChain` an internal lock will be set to prevent repeated execution. The `testChain` will be executed on every run. So the `readyChain` should bring your application in an "ready state". Make sure to initialize everything you need. The `testChain` should ping all services your application depends on.

### Liveness

[](#liveness)

Execute `./flow app:isalive` to check if your pod is still alive.

This will execute the `livenessChain`.

Currently the liveness chain is empty by default and has one possible test: `statusCode`.

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

[](#configuration)

Add all your tests in the following format in your apps Settings.yaml:

```
Oniva:
  Flow:
    HealthStatus:
      testChain:
        yourUniqueTestKey:
          name: 'Optional name'
          test: 'database' // shorthand for a predefined task in Oniva\Flow\HealthStatus\Test\*.Test or a full qualified class name
          options:
            key: 'value' // optional options for your test
          position: 'after otherTestKey' // optional position
```

After that, the check will execute the ready chain:

```
Oniva:
  Flow:
    HealthStatus:
      readyChain:
        yourUniqueTaskKey:
          name: 'Optional name'
          task: 'command' // shorthand for a predefined task in Oniva\Flow\HealthStatus\Task\*.Task or a full qualified class name
          options:
            key: 'value' // optional options for your task
          position: 'after otherTaskKey' / optional position
          lockName: 'mylock' // optional lock override. This will create a lock for this task only and ignore the global lock
```

After a successful ready chain invokation, you can call `./flow app:isalive` to execute your liveness chain:

```
Oniva:
  Flow:
    HealthStatus:
      livenessChain:
        yourUniqueTestKey:
          name: 'Optional name'
          task: 'statusCode' // shorthand for a predefined task in Oniva\Flow\HealthStatus\LivenessTest\*.Test or a full qualified class name
          options:
            key: 'value' // optional options for your task
          position: 'after otherTaskKey' / optional position
```

Advanced configuration
----------------------

[](#advanced-configuration)

Before each attempt to execute a ready task, the check will test the `Oniva.Flow.HealthStatus.defaultReadyTaskCondition` to see if the task should be executed. In the default configuration this is simply a check to see if the ready lock is not yet set.

You can override this behaviour on a per task basis:

```
Oniva:
  Flow:
    HealthStatus:
      readyChain:
        yourUniqueTaskKey:
          condition: '${Lock.isSet("mylock")}' // this can be any eel expression
          afterInvocation: '${Lock.set("mylock")}' // this will be executed after a successfull invocation
```

*(the `lockName` setting is simply a shorthand for exactly this example)*

To extend the eel context, you can provide additional helpers in `Oniva.Flow.HealthStatus.defaultContext`.

Health status via HTTP-Request
------------------------------

[](#health-status-via-http-request)

If you'd like to check your Application via HTTP instead of a cli command you can do so by including the Routes in your `Routes.yaml`:

```
-
  name: 'Health-Routes'
  uriPattern: ''
  subRoutes:
    'HealthStatusSubroutes':
      package: 'Oniva.Flow.HealthStatus'
      variables:
        'healthStatusEndpoint': 'your-endpoint-name'
```

Afterwards there will be two new routes: `//ready` and `//live`Adjust the variable to your needs. Both endpoints will return a JSON formatted output. On a successful run the response has a status code 200 and if there are any errors the status code will be 500.

Example Configuration
---------------------

[](#example-configuration)

This example could be used in your Flow package to make sure that your application pod has a ready state to serve traffic. Therefore it will always check the ping status for doctrine, redis and beanstalk. On the first run all missing database migrations will be executed, the redis cache flushed and static resources published. After a successfull run only the testChain will be executed again.

```
Oniva:
  Flow:
    HealthStatus:
      testChain:
        database:
          test: doctrine
          position: start
        redis:
          test: redis
          options:
            hostname: your-redis-host
        beanstalk:
          test: beanstalk
          options:
            hostname: your-beanstalk-host
      readyChain:
        migrations:
          task: command
          options:
            command: 'neos.flow:doctrine:migrate'
        flushRedis:
          name: 'Flush redis'
          position: 'start 100'
          task: redis
          options:
            hostname: your-redis-host
            command: FLUSHDB
            database: 0
        staticResources:
          name: 'Publish static resources'
          task: command
          position: 'end 20'
          lockname: staticresources
          cacheName: Oniva_FlowHealthStatus_LocalLock
          options:
            command: 'neos.flow:resource:publish'
            arguments:
              collection: static
      livenessChain:
        home:
          test: statusCode
          name: 'Homepage responds'
          options:
            url: '/'
            method: 'GET'
            statusCode: 200
```

Note the `lockname` configuration. This Configuration enables you to run tasks only once per deployment or always. By default the `Oniva_FlowHealthStatus_Lock` cache is used to read and write locks. Add this to your Caches.yaml and all your application pods will rely on the same lock files as they don't use the local file storage but redis. This will result in a execution once per deployment:

```
Oniva_FlowHealthStatus_Lock:
  backend: Neos\Cache\Backend\RedisBackend
  backendOptions:
    hostname: 'your-redis-server'
    database: 2
```

The `staticResources` task has a custom cacheName configured. To ensure that this task will be executed in each application pod set it to local file storage:

```
Oniva_FlowHealthStatus_LocalLock:
  frontend: Neos\Cache\Frontend\StringFrontend
  backend: Neos\Cache\Backend\FileBackend
```

Migration from t3n.Flow.HealthStatus
------------------------------------

[](#migration-from-t3nflowhealthstatus)

There is a code migration script to migrate your existing t3n.Flow.HealthStatus installation to Oniva.Flow.HealthStatus.

Simply run the flow command:

```
./flow core:migrate
```

Acknowledgments
---------------

[](#acknowledgments)

This project is a fork of [t3n.Flow.HealthStatus](https://github.com/t3n/flow-healthstatus) originally developed by t3n. We thank the original contributors for their foundational work.

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance62

Regular maintenance activity

Popularity6

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity35

Early-stage or recently created project

 Bus Factor1

Top contributor holds 56% 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

239d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/046c3b571b3c6a71006fd4801b46a8f827719302072db50114959ccd8f71821d?d=identicon)[oniva](/maintainers/oniva)

---

Top Contributors

[![johannessteu](https://avatars.githubusercontent.com/u/769789?v=4)](https://github.com/johannessteu "johannessteu (28 commits)")[![daniellienert](https://avatars.githubusercontent.com/u/642226?v=4)](https://github.com/daniellienert "daniellienert (7 commits)")[![simstern](https://avatars.githubusercontent.com/u/2580285?v=4)](https://github.com/simstern "simstern (6 commits)")[![Torsten85](https://avatars.githubusercontent.com/u/531361?v=4)](https://github.com/Torsten85 "Torsten85 (3 commits)")[![kdambekalns](https://avatars.githubusercontent.com/u/95873?v=4)](https://github.com/kdambekalns "kdambekalns (2 commits)")[![fl0uW](https://avatars.githubusercontent.com/u/69151846?v=4)](https://github.com/fl0uW "fl0uW (2 commits)")[![pagani-BETTERHOMES](https://avatars.githubusercontent.com/u/84859218?v=4)](https://github.com/pagani-BETTERHOMES "pagani-BETTERHOMES (1 commits)")[![das-nagnag](https://avatars.githubusercontent.com/u/5262896?v=4)](https://github.com/das-nagnag "das-nagnag (1 commits)")

### Embed Badge

![Health badge](/badges/oniva-flow-healthstatus/health.svg)

```
[![Health](https://phpackages.com/badges/oniva-flow-healthstatus/health.svg)](https://phpackages.com/packages/oniva-flow-healthstatus)
```

###  Alternatives

[psr/log

Common interface for logging libraries

10.4k1.2B9.2k](/packages/psr-log)[itsgoingd/clockwork

php dev tools in your browser

5.9k27.6M94](/packages/itsgoingd-clockwork)[graylog2/gelf-php

A php implementation to send log-messages to a GELF compatible backend like Graylog2.

41838.2M138](/packages/graylog2-gelf-php)[bugsnag/bugsnag-psr-logger

Official Bugsnag PHP PSR Logger.

32132.5M2](/packages/bugsnag-bugsnag-psr-logger)[consolidation/log

Improved Psr-3 / Psr\\Log logger based on Symfony Console components.

15462.2M7](/packages/consolidation-log)[datadog/php-datadogstatsd

An extremely simple PHP datadogstatsd client

19124.6M15](/packages/datadog-php-datadogstatsd)

PHPackages © 2026

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