para icon indicating copy to clipboard operation
para copied to clipboard

Add custom health check properties

Open jswiesner opened this issue 7 years ago • 1 comments

If Para uses the DropWizard health check, we can open up the opportunity to implement custom health check properties that layer in on top of the existing ones that Para uses. Para would register a root HealthCheckRegistry, and then we can expose a way for external code to add new properties. This would allow a custom DAO plugin, for example, to implement more sophisticated health check measures if desired.

jswiesner avatar Jan 08 '18 04:01 jswiesner

Sounds good. The easiest of way to do this is to load HealthCheckerAddon implementations through ServiceLoader and execute them one by one after the standard checks in HealthUtils. The interface could be:

public interface HealthCheckerAddon {
   public boolean performAdditionalHealthCheck(); 
}

And if one of the loaded external checks returns false the system would become unhealthy.

albogdano avatar Jan 08 '18 10:01 albogdano