3

we can add healthcheck like

environment.healthChecks().register(
   CheckpointConstant.CACHE,
   new CacheHealthCheck(adminConfiguration.getAppName())
);

but these are all in the '/healthcheck' interface.

how to add endpoints in port 8081, like '/healthcheck';e.g. '/liveness'.

lethean
  • 31
  • 6
  • 2
    Check here: https://howtodoinjava.com/dropwizard/health-check-configuration-example/ You are interested in the part titled `Custom REST Resource to Run Health Checks`. They use the `/status` endpoint URL, but you should get the idea :) – zloster Mar 03 '20 at 09:58
  • Does this answer your question? [Dropwizard : New admin resource](https://stackoverflow.com/questions/32764337/dropwizard-new-admin-resource) – LiorH Mar 04 '20 at 15:51
  • In the link you posted they explain how to add healthcheck like resource to the app port, he's interested in adding an endpoint to the admin app. – LiorH Mar 04 '20 at 15:52
  • 1
    I have the suspicion they don't need the `admin` app separation (or they are aware that it is not exactly necessary). Also I've just found this: https://github.com/dropwizard/dropwizard-health It's a recently new official module for `dropwizard`. There is a configuration value for the healtcheck URL. – zloster Mar 05 '20 at 18:44

0 Answers0