3slab / vdm-healthcheck-bundle
Provide a simple healthcheck endpoint that checks dependencies too
Installs: 1 397
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 4
Forks: 1
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=7.2
- symfony/framework-bundle: ^5.4|^6.4
- symfony/property-access: ^5.4|^6.4
- symfony/serializer: ^5.4|^6.4
- symfony/yaml: ^5.4|^6.4
Requires (Dev)
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- ext-sqlite3: *
- ext-xml: *
- doctrine/doctrine-bundle: ^2
- phpunit/phpunit: ^8|^9
- squizlabs/php_codesniffer: 3.*
- symfony/browser-kit: ^5.4
- symfony/css-selector: ^5.4
- symfony/http-client: ^5.4
Suggests
- doctrine/dbal: check a connection to an sql database
- doctrine/mongodb-odm-bundle: check a connection to a mongo database with doctrine odm
- symfony/http-client: check a dependent http service is up
This package is auto-updated.
Last update: 2024-10-26 16:46:59 UTC
README
This bundle provides all the tooling to implement simple healthcheck functionnality.
Installation
composer require 3slab/vdm-healthcheck-bundle
And load the routes in routing.yml
:
vdm_healthcheck: resource: "@VdmHealthcheckBundle/Resources/config/routing.yml" prefix: /
Configuration
Put your configuration in config/packages/vdm_healthcheck.yaml
file. This is the default :
vdm_healthcheck: secret: ~ liveness_path: /liveness liveness_checkers: {} readiness_path: /readiness readiness_checkers: {}
liveness_checkers
and readiness_checkers
are hash map. The key is the name given to this check and the value is
an hash map to configure the check.
vdm_healthcheck: liveness_checkers: name_of_your_checker: type: <checker type> arguments: []
Each checker has a name, a type and a list of constructor arguments depending on its type. Arguments support parameters
surrounded by %
or service id prefixed by @
.
Exemple :
vdm_healthcheck:
liveness_checkers:
db:
type: dbal
arguments:
- '@doctrine.dbal.default_connection'
Checker's types
You can also create your own checker