Details
-
Bug
-
Resolution: Done
-
Major
-
FIS 2.0
-
None
-
%
Description
Following the example from doc I'm not able to implement custom probe that would affect health-check of readiness-check output.
Anything I've missed, service registration etc.?
package com.redhat.xpaas.qe.probes; import org.apache.felix.scr.annotations.Component; import org.apache.felix.scr.annotations.ConfigurationPolicy; import org.apache.felix.scr.annotations.Service; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.util.Collections; import java.util.List; import io.fabric8.karaf.checks.Check; import io.fabric8.karaf.checks.HealthChecker; import io.fabric8.karaf.checks.ReadinessChecker; @Component( name = "com.redhat.xpaas.qe.probes.RougeProbe", immediate = true, enabled = true, policy = ConfigurationPolicy.IGNORE, createPid = false ) @Service({ReadinessChecker.class, HealthChecker.class}) public class RougeProbe implements ReadinessChecker, HealthChecker { private static final transient Logger LOG = LoggerFactory.getLogger(RougeProbe.class); @Override public List<Check> getFailingReadinessChecks() { LOG.info("Calling readiness check"); return Collections.singletonList(new Check("rogue-readiness-probe", "Kill me now!")); } @Override public List<Check> getFailingHeathChecks() { LOG.info("Calling health check"); return Collections.singletonList(new Check("rogue-liveness-probe", "Kill me now!")); } }