I have a healthcheck handler which checks the status of my
application. However my application does not update the status of the
app to Eureka. Eureka always shows the app as UP.
I have set:
com.netflix.karyon.unify.health.check.with.eureka=true
com.netflix.karyon.health.check.handler.classname=com.test.testcsf.simplesidecar.SimpleSidecarHealthCheckHandler
com.netflix.karyon.server.base.packages=com.test.testcsf.simplesidecar
My SimpleSidecarHealthCheckHandler
code is:
import com.netflix.karyon.spi.HealthCheckHandler;
public class SimpleSidecarHealthCheckHandler implements HealthCheckHandler {
private static final Logger logger = LoggerFactory.getLogger(SimpleSidecarHealthCheckHandler.class);
/** */
@Inject
CheckManager checkManager;
@Override
public int getStatus() {
logger.debug("health check being called");
boolean passing = checkManager.allHealthChecksPassing();
//logger.error("ROHIT| Passing: "+ passing);
return passing ? 200 : 503;
}
}
checkManager is a class which keeps track of whether the service is
down or not. When I print logs, I see that this function is not being
called at all. Could someone guide me on what setting should I change ?