Skip to content

Health check installer

CoreInstallersBundle / HealthCheckInstaller

Installs dropwizard health check.


Detects classes extending guicey NamedHealthCheck and register their instances in environment. Custom base class is required, because default HealthCheck did not provide check name, which is required for registration.

public class MyHealthCheck extends NamedHealthCheck {

    private MyService service;

    protected Result check() throws Exception {
        if (service.isOk()) {
            return Result.healthy();
        } else {
            return Result.unhealthy("Service is not ok");

    public String getName() {
        return "my-service";