Download the PHP package alahaxe/healthcheck-bundle without Composer
On this page you can find all versions of the php package alahaxe/healthcheck-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download alahaxe/healthcheck-bundle
More information about alahaxe/healthcheck-bundle
Files in alahaxe/healthcheck-bundle
Package healthcheck-bundle
Short Description Extensible healthcheck bundle for SF
License MIT
Informations about the package healthcheck-bundle
HealthCheck Bundle
This bundle allows to easily expose a healthcheck on a Symfony application. You can add as many checks you want and create your own checks.
Installation
Quickstart
1- Router
Register package routes in your application
Default route for healthcheck is /_healthcheck
2- Firewall
Allow any requests to call the healthcheck endpoint.
Use custom route
Do not load resource @HealthCheckBundle/Resources/config/router.yaml
file in your router but add:
Adapte firewall pattern:
Use available checks
Name | Package | Current version |
---|---|---|
Doctrine check | alahaxe/healthcheck-doctrine | |
System check | alahaxe/healthcheck-system | |
Redis check | alahaxe/healthcheck-redis | |
Curl check | alahaxe/healthcheck-curl |
Add a custom check
Create a custom class that implements CheckInterface
:
The output on /_healthcheck
will be:
`
Register the service with the tag lahaxearnaud.healthcheck.check
:
Or if you have many checks you can add the tag on a folder:
Http verbosity
Verbosity configuration allows to redure informations exposed publicly.
If your healthcheck is protected (firewall, network rules...) you should use a full configuration.
Default verbosity is minimal
Full configuration
In your symfony configs:
Example of http response:
Minimal configuration:
In your symfony configs:
Example of http response:
Events / Listeners
Name | When |
---|---|
Alahaxe\HealthCheckBundle\Event\HealthCheckAllEvent::class |
When all checks are tested |
Alahaxe\HealthCheckBundle\Event\HealthCheckEvent::class |
When a check is tested |
By default a log is written on each Alahaxe\HealthCheckBundle\Event\HealthCheckAllEvent::class
, take a look at Alahaxe\HealthCheckBundle\Event\Subscriber\LoggerSubscriber
for an example.
License
This bundle is under the MIT license. See the complete license in the bundle.
All versions of healthcheck-bundle with dependencies
ext-json Version *
psr/log Version ^1||^2||^3
symfony/config Version ^6.0 || ^7.0
symfony/console Version ^6.0 || ^7.0
symfony/event-dispatcher-contracts Version ^2 || ^3
symfony/dependency-injection Version ^6.0 || ^7.0
symfony/http-kernel Version ^6.0 || ^7.0
symfony/framework-bundle Version ^6.0 || ^7.0
symfony/http-foundation Version ^6.0 || ^7.0
alahaxe/healthcheck-contracts Version ^1.1