[
https://issues.apache.org/jira/browse/SLING-7069?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jörg Hoh updated SLING-7069:
----------------------------
Description:
I have a CompositeHealthcheck like this
{code}
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0"
xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
xmlns:nt="http://www.jcp.org/jcr/nt/1.0"
jcr:primaryType="sling:OsgiConfig"
hc.name="Health Checks (Runtime)"
hc.mbean.name="runtime-monitoring"
filter.tags="[tag1,tag2,tag3]"
hc.tags="[runtime-monitoring]"
hc.async.cronExpression="50 0/1 * 1/1 * ? *"/>
{code}
whenever I run a healthcheck on the tag "runtime-monitoring" the healthchecks
tagged with "tag1", "tag2" and "tage3" should be executed.
But whenever I run the healthceck on "runtime-monitoring", noone is executed at
all.
I tracked it down to the fact, that only these healthchecks are executed which
have all tags (tag1,tag2 and tag3) configured. Which of course none of my tags
are.
{code}
21.08.2017 17:06:00.502 *DEBUG* [HealthCheck Health Checks (Runtime)]
org.apache.sling.hc.util.HealthCheckFilter OSGi service filter in
getTaggedHealthCheckServiceReferences():
(&(objectClass=org.apache.sling.hc.api.HealthCheck)(hc.tags=tag1)(hc.tags=tag2)(hc.tags=tag3))
{code}
It seems to me that instead of the AND it should be an OR:
{code}
(&(objectClass=org.apache.sling.hc.api.HealthCheck)(|(hc.tags=tag1)(hc.tags=tag2)(hc.tags=tag3)))
{code}
was:
I have a CompositeHealthcheck like this
{code}
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0"
xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
xmlns:nt="http://www.jcp.org/jcr/nt/1.0"
jcr:primaryType="sling:OsgiConfig"
hc.name="Health Checks (Runtime)"
hc.mbean.name="runtime-monitoring"
filter.tags="[tag1,tag2,tag3]"
hc.tags="[runtime-monitoring]"
hc.async.cronExpression="50 0/1 * 1/1 * ? *"/>
{code}
whenever I run a healthcheck on the tag "runtime-monitoring" the healthchecks
tagged with "tag1", "tag2" and "tage3" should be executed.
But whenever I run the healthceck on "runtime-monitoring", noone is executed at
all.
I tracked it down to the fact, that only these healthchecks are executed which
have all tags (tag1,tag2 and tag3) configured. Which of course none of my tags
are.
{code}
21.08.2017 17:06:00.502 *DEBUG* [HealthCheck Health Checks (Runtime)]
org.apache.sling.hc.util.HealthCheckFilter OSGi service filter in
getTaggedHealthCheckServiceReferences():
(&(objectClass=org.apache.sling.hc.api.HealthCheck)(hc.tags=tag1)(hc.tags=tag2)(hc.tags=tag3))
{code}
It seems to me that instead of the AND it should be an OR.
> CompositeHealthcheck combines subchecks with AND
> ------------------------------------------------
>
> Key: SLING-7069
> URL: https://issues.apache.org/jira/browse/SLING-7069
> Project: Sling
> Issue Type: Bug
> Components: Health Check
> Affects Versions: Health Check Core 1.2.8
> Reporter: Jörg Hoh
>
> I have a CompositeHealthcheck like this
> {code}
> <jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0"
> xmlns:cq="http://www.day.com/jcr/cq/1.0"
> xmlns:jcr="http://www.jcp.org/jcr/1.0"
> xmlns:nt="http://www.jcp.org/jcr/nt/1.0"
> jcr:primaryType="sling:OsgiConfig"
> hc.name="Health Checks (Runtime)"
> hc.mbean.name="runtime-monitoring"
> filter.tags="[tag1,tag2,tag3]"
> hc.tags="[runtime-monitoring]"
> hc.async.cronExpression="50 0/1 * 1/1 * ? *"/>
> {code}
> whenever I run a healthcheck on the tag "runtime-monitoring" the healthchecks
> tagged with "tag1", "tag2" and "tage3" should be executed.
> But whenever I run the healthceck on "runtime-monitoring", noone is executed
> at all.
> I tracked it down to the fact, that only these healthchecks are executed
> which have all tags (tag1,tag2 and tag3) configured. Which of course none of
> my tags are.
> {code}
> 21.08.2017 17:06:00.502 *DEBUG* [HealthCheck Health Checks (Runtime)]
> org.apache.sling.hc.util.HealthCheckFilter OSGi service filter in
> getTaggedHealthCheckServiceReferences():
> (&(objectClass=org.apache.sling.hc.api.HealthCheck)(hc.tags=tag1)(hc.tags=tag2)(hc.tags=tag3))
> {code}
> It seems to me that instead of the AND it should be an OR:
> {code}
> (&(objectClass=org.apache.sling.hc.api.HealthCheck)(|(hc.tags=tag1)(hc.tags=tag2)(hc.tags=tag3)))
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)