PHPackages                             openconext/monitor-bundle - 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. openconext/monitor-bundle

ActiveSymfony-bundle[Logging &amp; Monitoring](/categories/logging)

openconext/monitor-bundle
=========================

A Symfony 6/7 bundle that facilitates health and info endpoints to a Symfony application.

4.3.1(2y ago)682.0k↓12.2%2[4 issues](https://github.com/OpenConext/Monitor-bundle/issues)[1 PRs](https://github.com/OpenConext/Monitor-bundle/pulls)Apache-2.0PHPPHP &gt;=8.2, &lt;9.0-devCI failing

Since Dec 7Pushed 2mo ago12 watchersCompare

[ Source](https://github.com/OpenConext/Monitor-bundle)[ Packagist](https://packagist.org/packages/openconext/monitor-bundle)[ RSS](/packages/openconext-monitor-bundle/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (10)Dependencies (12)Versions (26)Used By (0)

OpenConext Monitor bundle
=========================

[](#openconext-monitor-bundle)

[![Code_Checks](https://github.com/OpenConext/Monitor-bundle/actions/workflows/code_checks.yaml/badge.svg)](https://github.com/OpenConext/Monitor-bundle/actions/workflows/code_checks.yaml)

A Symfony 5/6/7 bundle that adds an /internal/health and /internal/info endpoint to your application.

The endpoints return JSON responses. The `/internal/info` endpoint tries to give as much information about the currently installed version of the application as possible. This information is based on the build path of the installation. But also includes the Symfony environment that is currently active and whether the debugger is enabled.

The `/internal/health` endpoint reports on the health of the application. This information could be used for example by a load balancer. Example output:

```
{"status":"UP"}
```

When a health check failed the HTTP Response status code will be 503. And the JSON Response is formatted like this:

```
{"status":"DOWN", "message":"Lorem ipsum dolor sit"}
```

❗ Please note that only the first failing health check is reported.

❗ As of version 3.1.0 we started exposing the `health` and `info` routes on `/internal/`. On the next major version we will stop serving the `info` and `health` endpoints on `/`

Installation
------------

[](#installation)

- Add the package to your Composer file

    ```
    composer require openconext/monitor-bundle
    ```
- If you don't use [Symfony Flex](https://symfony.com/doc/current/setup/flex.html), you must enable the bundle manually in the application:

    ```
    // config/bundles.php
    // in older Symfony apps, enable the bundle in config/bundles.php
    return [
    // ...
     OpenConext\MonitorBundle\OpenConextMonitorBundle::class => ['all' => true],
    ];
    ```
- Include the routing configuration in `config/routes.yaml` by adding:

    ```
    open_conext_monitor:
        resource: "@OpenConextMonitorBundle/src/Controller"
        type: attribute
        prefix: /
    ```

*Note: this is currently done by the bundle itself, with an external dependency called *

- Add security exceptions in `config/packages/security.yaml` (if this is required at all) ```
    security:
        firewalls:
            monitor:
                pattern: ^/internal/(info|health)$
                security: false
    ```
- The /internal/info and /internal/health endpoints should now be available for everybody. Applying custom access restriction is up to the implementer of this bundle.

Adding Health Checks
--------------------

[](#adding-health-checks)

The Monitor ships with two health checks. These checks are a

- Database connection check based on Doctrine configuration
- Session status check

### Create the checker

[](#create-the-checker)

A `HealthCheckInterface` can be implemented to create your own health check. The example below shows an example of what an implementation of said interface could look like.

```
use OpenConext\MonitorBundle\HealthCheck\HealthCheckInterface;
use OpenConext\MonitorBundle\HealthCheck\HealthReportInterface;
use OpenConext\MonitorBundle\Value\HealthReport;

class ApiHealthCheck implements HealthCheckInterface
{
    public function __construct(private readonly MyService $service)
    {
    }

    public function check(HealthReportInterface $report): HealthReportInterface
    {
        if (!$this->service->everythingOk()) {
            // Return a HealthReport with a DOWN status when there are indications the application is not functioning as
            // intended. You can provide an optional message that is displayed alongside the DOWN status.
            return HealthReport::buildStatusDown('Not everything is allright.');
        }
        // By default, return the report that was passed along as a parameter to the check method
        return $report;
    }
}
```

❗ Please note that the check method receives and returns a HealthReport. The Health report is passed along in the chain of registered health checkers. If everything was OK, just return the report that was passed to the method.

### Register the checker

[](#register-the-checker)

By implementing the `HealthCheckInterface` you can register your own health check. This interface is tagged automatically, so you don't have to do it yourself.

Overriding a default HealthCheck
--------------------------------

[](#overriding-a-default-healthcheck)

To run a custom query with the DoctrineConnectionHealthCheck you will need to override it in your own project.

For example in your ACME bundle that is using the monitor bundle:

`services.yaml`

```
    # Override the service in `/src/config/services.yaml`
    OpenConext\MonitorBundle\HealthCheck\DoctrineConnectionHealthCheck:
        # Point to your own implementation of the check
        class: Acme\GreatSuccessBundle\HealthCheck\DoctrineConnectionHealthCheck
```

The rest of the service configuration is up to your own needs. You can inject arguments, factory calls and other service features as need be.

Release strategy
----------------

[](#release-strategy)

Please read:  for more information on the release strategy used in Stepup projects.

###  Health Score

53

—

FairBetter than 96% of packages

Maintenance44

Moderate activity, may be stable

Popularity37

Limited adoption so far

Community21

Small or concentrated contributor base

Maturity91

Battle-tested with a long release history

 Bus Factor2

2 contributors hold 50%+ of commits

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

Recently: every ~28 days

Total

19

Last Release

747d ago

Major Versions

1.0.5 → 2.02020-06-22

2.1.0 → 3.0.02022-03-03

3.1.0 → 4.0.02023-10-31

PHP version history (3 changes)1.0.0PHP &gt;=5.4,&lt;8.0-dev

3.0.0PHP &gt;=7.2, &lt;9.0-dev

4.0.0PHP &gt;=8.2, &lt;9.0-dev

### Community

Maintainers

![](https://www.gravatar.com/avatar/501dd2b6f124d458fb362a1d4f783d971ccbacfb46294468ab3151b983093715?d=identicon)[joostd](/maintainers/joostd)

![](https://www.gravatar.com/avatar/9221e348303eeda74e85236a8bff9b919a90d10e3a478fe1cbb9d833f68d0150?d=identicon)[thijskh](/maintainers/thijskh)

---

Top Contributors

[![parijke](https://avatars.githubusercontent.com/u/7671998?v=4)](https://github.com/parijke "parijke (36 commits)")[![MKodde](https://avatars.githubusercontent.com/u/28252948?v=4)](https://github.com/MKodde "MKodde (30 commits)")[![Chris53897](https://avatars.githubusercontent.com/u/7104259?v=4)](https://github.com/Chris53897 "Chris53897 (19 commits)")[![pablothedude](https://avatars.githubusercontent.com/u/30088478?v=4)](https://github.com/pablothedude "pablothedude (5 commits)")[![Chris8934](https://avatars.githubusercontent.com/u/44963939?v=4)](https://github.com/Chris8934 "Chris8934 (4 commits)")[![thijskh](https://avatars.githubusercontent.com/u/3808792?v=4)](https://github.com/thijskh "thijskh (4 commits)")[![kayjoosten](https://avatars.githubusercontent.com/u/47044428?v=4)](https://github.com/kayjoosten "kayjoosten (3 commits)")[![tacman](https://avatars.githubusercontent.com/u/619585?v=4)](https://github.com/tacman "tacman (3 commits)")[![tvdijen](https://avatars.githubusercontent.com/u/841045?v=4)](https://github.com/tvdijen "tvdijen (1 commits)")

---

Tags

monitoringhealthsurfnetstepupOpenConext

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/openconext-monitor-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/openconext-monitor-bundle/health.svg)](https://phpackages.com/packages/openconext-monitor-bundle)
```

###  Alternatives

[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.9M388](/packages/easycorp-easyadmin-bundle)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.5k5.9M738](/packages/sylius-sylius)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.4M203](/packages/sulu-sulu)[2lenet/crudit-bundle

The easy like Crud'it Bundle.

1616.4k14](/packages/2lenet-crudit-bundle)[shopware/storefront

Storefront for Shopware

684.6M236](/packages/shopware-storefront)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.6M574](/packages/shopware-core)

PHPackages © 2026

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