A ready-to-use LifeCycle that registers and reports health to Consul. It assumes you're using Jindy and that your application is also a LifeCycle with a well implemented isRunning() method.
In your application configuration, make sure you have the following properties
my.service.address= node354.mydomain.com #the address your service will be exposed on (defaults to the node's IP)
my.service.port=1337 #the port your service will be exposed on (mandatory). The key is arbitrary
healthy.interval.millis=10000 #the health report interval (defaults to 10000, minimum value=1000)
consul.host=localhost #Consul's host (defaults to localhost)
consul.port=8500 #Consul's port (defaults to 8500)
In your application bootstrap, run the following code
Healthy l = new Healthy(myApp, "myapp", null, "my.service.port");
l.start();