@@ -0,0 +1,1394 @@
+package com.github.digital_wonderland.sling_metrics.service;%0A%0Aimport com.codahale.metrics.health.HealthCheckRegistry;%0Aimport org.apache.felix.scr.annotations.Activate;%0Aimport org.apache.felix.scr.annotations.Component;%0Aimport org.apache.felix.scr.annotations.Property;%0Aimport org.apache.felix.scr.annotations.Service;%0Aimport org.osgi.service.component.ComponentContext;%0Aimport org.slf4j.Logger;%0Aimport org.slf4j.LoggerFactory;%0A%0A@Component(name = %22Health Check Service%22, metatype = true)%0A@Service(value = HealthCheckService.class)%0Apublic class HealthCheckService %7B%0A%0A    private static final Logger LOG = LoggerFactory.getLogger(HealthCheckService.class);%0A%0A    @Property(label = %22Enabled%22, boolValue = true, description = %22Should the health check service be enabled%22)%0A    private static final String HEALTH_CHECK_SERVICE_ENABLED = %22healthCheckService.enabled%22;%0A%0A    private HealthCheckRegistry registry;%0A    private boolean isEnabled;%0A%0A    @Activate%0A    protected void activate(final ComponentContext context) %7B%0A        isEnabled = (Boolean) context.getProperties().get(HEALTH_CHECK_SERVICE_ENABLED);%0A        if(isEnabled) %7B%0A            registry = new HealthCheckRegistry();%0A            LOG.debug(%22New HealthCheckRegistry created%22);%0A        %7D%0A    %7D%0A%0A    public HealthCheckRegistry getRegistry() %7B%0A        return registry;%0A    %7D%0A%0A    public boolean isEnabled() %7B%0A        return isEnabled;%0A    %7D%0A%7D%0A

add health check service