The Sling Health Check Runtime is deprecated and superseded by Felix Health Checks. See Sling Health Check Tools (deprecated) for documentation prior to deprecation and Sling Health Checks for checks implemented against the Felix Health Checks Runtime.
org.apache.sling:org.apache.sling.hc.api
and org.apache.sling:org.apache.sling.hc.annotations
(if used)<dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.healthcheck.api</artifactId>
<version>2.0.4</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.healthcheck.annotation</artifactId>
<version>2.0.0</version>
<scope>provided</scope>
</dependency>
Typically necessary steps:
Organize Imports
functionality of your IDE to fix the imports (mostly it is just replacing org.apache.sling.hc.api
with org.apache.felix.hc.api
, however the commonly used class FormattingResultLog
has been moved from org.apache.sling.hc.util
to org.apache.felix.hc.api
)@SlingHealthCheck
is used, replace that one with the new Felix annotations from org.apache.felix.healthcheck.annotationutil
package in the api bundle anymore, apart from FormattingResultLog
the other classes in the package were rarely used. The class SimpleConstraintChecker
has moved to org.apache.felix.hc.generalchecks.util
in bundle generalchecks
(maven dependency to org.apache.felix.healthcheck.generalchecks
needs to be added for that case). For the other classes there is no replacement.Only necessary if the the respective feature is used:
hc.warningsStickForMinutes
, this has been renamed to hc.keepNonOkResultsStickyForSec
- here the unit has changed from min to sec in order to allow for second-magnitude values that can be useful for deployment scenarioshc.async.cronExpression
is used, the bundle org.apache.servicemix.bundles.quartz
may be added to use quartz for cron expressions (in the same way as it was the case for the Sling Health Checks). If the bundle is not present, a simple cron trigger implementation included in org.apache.felix.healthcheck.core
will be used instead, see FELIX-6265 for details.org.apache.sling.hc.api
- keep to ensure bundles with checks that are not yet migrated work (can be removed once all bundles are migrated to new API)org.apache.sling.hc.core
- removeorg.apache.sling.hc.webconsole
- removeorg.apache.sling.hc.support
- keep, Sling specific health checks that don't fit anywhere else go thereorg.apache.felix.healthcheck.api
- addorg.apache.felix.healthcheck.core
- add (also runs checks implemented against org.apache.sling.hc.api
by default)org.apache.felix.healthcheck.webconsoleplugin
- addorg.apache.felix.healthcheck.generalchecks
- add (optional but recommended)