Expand my Community achievements bar.

SOLVED

Migrate from Sling to Felix Health Checks

Avatar

Level 2

Hi

Because the Sling Health Checks are deprecated, we want to migrate to Felix Health Check. Everything works so far with the new Felix Health Executor Servlet, but we troubles to switch also the Granite healthreportlist (/granite/operations/content/healthreports/healthreportlist.html). Our tile with the Composite HC (Mbean-Name: companyGlobalHc) shows always "Status: MBean does not exist.", even they exist as MBean.

 

This is, what we create in CXR:

 

<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0"
xmlns:rep="internal"
sling:configCollectionInherit="true"
jcr:primaryType="sling:Folder">
<css_infra_healthcheck jcr:primaryType="nt:unstructured"
name="Company Healthchecks"
resource="/system/sling/monitoring/mbeans/org/apache/felix/healthcheck/HealthCheck/companyGlobalHc"
sling:resourceType="granite/operations/components/mbean"/>
</jcr:root>

 Does anyone has an idea?

However, is it recommended to switch to the Felix HC with AEM 6.5.12?

Best, Mario

1 Accepted Solution

Avatar

Correct answer by
Level 2

I've had to add to additional (org.apache.sling.hc.support &org.apache.felix.healthcheck.generalchecks) dependencies and after a complete restart now its working.

 

<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.hc.support</artifactId>
<version>1.0.6</version>
</dependency>

<dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.healthcheck.generalchecks</artifactId>
<version>2.0.14</version>
</dependency>

 There is a good example here:
https://github.com/Netcentric/healthcheck-migration-kit/blob/develop/hc-migration-felix-healthcheck-...

View solution in original post

3 Replies

Avatar

Employee Advisor

Is the mbeanName really "org.apache.felix.healthcheck.HealthCheck/companyGlobalHc"? 

 

I would check that with the JMX console (/system/console/jmx)

 

Avatar

Level 2

Hi Jörg_Hoh

 

Thank you for your reply.

 

The mbeanName is "companyGlobalHc" and its from a Felix CompositeHealthCheck (org.apache.felix.hc.core.impl.CompositeHealthCheck~companyinfra). No JMX entries for "org.apache.felix.healthcheck.HealthCheck" appears. If I switch back to the Sling Healthchecks, the JMX will appear again under "org.apache.sling.healthcheck".

 

Even if I'm using the Felix HC Webconsole to execute the healthchecks they are working fine.

 

I only have troubles to switch the Granite healthreportlist to show the Felix HC and to see any JMX entries. Is there a missing bundle to enable it?

 

Thank you.

 

Best

Mario

Avatar

Correct answer by
Level 2

I've had to add to additional (org.apache.sling.hc.support &org.apache.felix.healthcheck.generalchecks) dependencies and after a complete restart now its working.

 

<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.hc.support</artifactId>
<version>1.0.6</version>
</dependency>

<dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.healthcheck.generalchecks</artifactId>
<version>2.0.14</version>
</dependency>

 There is a good example here:
https://github.com/Netcentric/healthcheck-migration-kit/blob/develop/hc-migration-felix-healthcheck-...