Health Check Bundle

Installs: 11 709

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 39

Forks: 0

Open Issues: 1


2.2.0 2022-09-05 10:41 UTC

This package is auto-updated.

Last update: 2023-01-05 11:28:23 UTC


Latest Version License GPL2 Build Status Coverage Status Packagist Downloads

Symfony bundle for health checks automation, based on health check library

Table of Contents


$ composer require oat-sa/bundle-health-check

Note: the related flex recipe will enable and auto configure the bundle in your application.


Available endpoints

This bundle provides by default the following endpoints:

Method Route Description
GET /ping ensures your application is up and running (no logic)
GET /health-check runs registered checkers (custom logic)


  • you can check the related openapi documentation for more details
  • you can update / disable those routes in the config/routes/health_check.yaml file of your application (created by flex recipe)


The ping endpoint just returns a 200 response with the string pong as body.

It is just here to ensure your application is correctly installed, up and running.

Health Checker

This bundle will automatically add the tag health_check.checker to your application services if they implement the CheckerInterface (they will be auto registered onto the HealthChecker service).

If you want to register a CheckerInterface implementation from 3rd party libraries, you can configure them as following:

# config/services.yaml

            - { name: 'health_check.checker', priority: 2 }

            - { name: 'health_check.checker', priority: 1 }

Note: you can use the priority property of the health_check.checker tag to order them.

Available command

If you prefer to run your checks in CLI mode, this bundle provides by default the following command:

$ bin/console health:check


  • it runs registered checkers as explained in section above
  • it returns 0 in case of overall success, or 1 if one (or more than one) checker failed
  • it displays a summary of all executed checkers and their result


To run provided tests:

$ vendor/bin/phpunit

Note: see phpunit file for available suites.