Monitoring OSGI Components | Community
Skip to main content
jkpanera
Level 4
September 18, 2020
Solved

Monitoring OSGI Components

  • September 18, 2020
  • 1 reply
  • 1630 views

Hi guys,

 

We would like to monitor our OSGI components (possibly using JMX) so that if one fails to start, we will be notified. Could someone point us in the right direction?

 

Thanks!

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Nirmal_Jose

Hi @jkpanera ,

 

There is already a sling health check for active bundles. If there are any inactive bundles other than mentioned in the InactiveBundlesHealthCheck configuration, it will show up the status there. You can see the JMX for the same at [1]. You can access the healthcheck at [2] or that as a JSON endpoint at [3]

 

[1] - http://localhost:4502/system/console/jmx/org.apache.sling.healthcheck%3Aname%3DinactiveBundles%2Ctype%3DHealthCheck

[2] - http://localhost:4502/libs/granite/operations/content/healthreports/healthreport.html/system/sling/monitoring/mbeans/org/apache/sling/healthcheck/HealthCheck/inactiveBundles 

[3] - http://localhost:4502/system/sling/monitoring/mbeans/org/apache/sling/healthcheck/HealthCheck/inactiveBundles.json 

1 reply

Nirmal_Jose
Adobe Employee
Nirmal_JoseAdobe EmployeeAccepted solution
Adobe Employee
September 18, 2020

Hi @jkpanera ,

 

There is already a sling health check for active bundles. If there are any inactive bundles other than mentioned in the InactiveBundlesHealthCheck configuration, it will show up the status there. You can see the JMX for the same at [1]. You can access the healthcheck at [2] or that as a JSON endpoint at [3]

 

[1] - http://localhost:4502/system/console/jmx/org.apache.sling.healthcheck%3Aname%3DinactiveBundles%2Ctype%3DHealthCheck

[2] - http://localhost:4502/libs/granite/operations/content/healthreports/healthreport.html/system/sling/monitoring/mbeans/org/apache/sling/healthcheck/HealthCheck/inactiveBundles 

[3] - http://localhost:4502/system/sling/monitoring/mbeans/org/apache/sling/healthcheck/HealthCheck/inactiveBundles.json 

jkpanera
jkpaneraAuthor
Level 4
September 18, 2020
Thank you!