[
https://issues.apache.org/jira/browse/SLING-2987?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13725326#comment-13725326
]
Bertrand Delacretaz edited comment on SLING-2987 at 7/31/13 3:17 PM:
-
At revision 1508906 the hc-core bundle works again with the new design, in the
branch at
https://svn.apache.org/repos/asf/sling/branches/SLING-2987-healthcheck-redesign/hc-core
The only thing that works so far is JMX access to HealthCheck services, which
can check (combinations of) JMX attributes.
To test that, install just this hc-core bundle and create the below 3 OSGi
configurations, and 3 MBeans should be created in the JMX console under
org.apache.sling.healthcheck, one for each HealthCheck service.
PID =
org.apache.sling.hc.impl.JmxAttributeHealthCheck.219f0ac7-7b17-465f-80dd-0b8ef9db0f86
attribute.name = LoadedClassCount
attribute.value.constraint = between 5000 and 5
hc.name = JMX class loading
hc.tags = [jvm, classes]
mbean.name = java.lang:type=ClassLoading
PID =
org.apache.sling.hc.impl.ScriptableHealthCheck.b2505395-df47-46a9-ac8a-5e8ca77eefc9
expression = jmx.attribute('java.lang:type=ClassLoading', 'LoadedClassCount')
10
jmx.attribute('java.lang:type=Runtime', 'ManagementSpecVersion') 1
hc.name = Scripted example
hc.tags = [jvm, javascript]
language.extension = ecma
PID =
org.apache.sling.hc.impl.ScriptableHealthCheck.df9454a1-b774-446b-a955-a8ca1667b05d
BundleLocation = inputstream:org.apache.sling.hc.core-0.0.2-SNAPSHOT.jar
expression = osgi.inactiveBundlesCount() == 0
hc.name = Inactive OSGi bundles
hc.tags = [bundles]
language.extension = ecma
was (Author: bdelacretaz):
At revision 1508906 the hc-core bundle works again with the new design, in
the branch at
https://svn.apache.org/repos/asf/sling/branches/SLING-2987-healthcheck-redesign/hc-core
The only thing that works so far is JMX access to HealthCheck services, which
can check (combinations of) JMX attributes.
To test that, create the below 3 OSGi configurations, and 3 MBeans should be
created in the JMX console under org.apache.sling.healthcheck, one for each
HealthCheck service.
PID =
org.apache.sling.hc.impl.JmxAttributeHealthCheck.219f0ac7-7b17-465f-80dd-0b8ef9db0f86
attribute.name = LoadedClassCount
attribute.value.constraint = between 5000 and 5
hc.name = JMX class loading
hc.tags = [jvm, classes]
mbean.name = java.lang:type=ClassLoading
PID =
org.apache.sling.hc.impl.ScriptableHealthCheck.b2505395-df47-46a9-ac8a-5e8ca77eefc9
expression = jmx.attribute('java.lang:type=ClassLoading', 'LoadedClassCount')
10
jmx.attribute('java.lang:type=Runtime', 'ManagementSpecVersion') 1
hc.name = Scripted example
hc.tags = [jvm, javascript]
language.extension = ecma
PID =
org.apache.sling.hc.impl.ScriptableHealthCheck.df9454a1-b774-446b-a955-a8ca1667b05d
BundleLocation = inputstream:org.apache.sling.hc.core-0.0.2-SNAPSHOT.jar
expression = osgi.inactiveBundlesCount() == 0
hc.name = Inactive OSGi bundles
hc.tags = [bundles]
language.extension = ecma
Simplified health check services
Key: SLING-2987
URL: https://issues.apache.org/jira/browse/SLING-2987
Project: Sling
Issue Type: Improvement
Components: Health Check
Reporter: Bertrand Delacretaz
Assignee: Bertrand Delacretaz
Priority: Minor
After some prototyping, the health check tools are ready for a rewrite that
will make them simpler and more OSGi friendly.
The functionality will be similar but with much less code, more focused on
the actual use cases that have emerged during prototyping.
The new API is being discussed on list,
http://markmail.org/thread/i6ib7tgax4cn2sss
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira