[
https://issues.apache.org/jira/browse/FELIX-6117?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16837249#comment-16837249
]
Stefan Bischof commented on FELIX-6117:
---------------------------------------
The Result of Gogo SCR:info
{code:java}
Component Description: org.apache.felix.hc.generalchecks.DiskSpaceCheck
=======================================================================
Class: org.apache.felix.hc.generalchecks.DiskSpaceCheck
Bundle: 26 (org.apache.felix.healthcheck.generalchecks:2.0.0)
Enabled: true
Immediate: false
Services: [org.apache.felix.hc.api.HealthCheck]
Scope: singleton
Config PID(s): [org.apache.felix.hc.generalchecks.DiskSpaceCheck], Policy:
require
Base Props: (5 entries)
diskPaths<String[]> = [.]
diskUsedThresholdCritical<Long> = 97
diskUsedThresholdWarn<Long> = 90
hc.name<String> = Disk Space
webconsole.configurationFactory.nameHint<String> = {hc.name}: {diskPaths}
used>{diskUsedThresholdWarn}% -> WARN used>{diskUsedThresholdCritical}% ->
CRITICAL
Component Configuration Id: 11
------------------------------
State: SATISFIED
Service: 43 [org.apache.felix.hc.api.HealthCheck]
Config Props: (11 entries)
component.id<Long> = 11
component.name<String> = org.apache.felix.hc.generalchecks.DiskSpaceCheck
diskPaths<Vector> = [.]
diskUsedThresholdCritical<Integer> = 10
diskUsedThresholdWarn<Integer> = 15
hc.name<String> = myTest222
hc.tags<Vector> = [system, system_memory, dings]
service.factoryPid<String> = org.apache.felix.hc.generalchecks.DiskSpaceCheck
service.pid<String> = org.apache.felix.hc.generalchecks.DiskSpaceCheck~test2
webconsole.configurationFactory.nameHint<String> = {hc.name}: {diskPaths}
used>{diskUsedThresholdWarn}% -> WARN used>{diskUsedThresholdCritical}% ->
CRITICAL
References: (total 0)
{code}
{code:java}
I think the configuration works correct!
hc.tags<Vector> = [system, system_memory, dings]{code}
did you tryed to request the json?
[http://localhost:8080/system/health/*.json]
> generalchecks - json does not show tags
> ---------------------------------------
>
> Key: FELIX-6117
> URL: https://issues.apache.org/jira/browse/FELIX-6117
> Project: Felix
> Issue Type: Bug
> Components: Health Checks
> Affects Versions: healthcheck.core 2.0.0, healthcheck.generalchecks 2.0.0
> Reporter: Stefan Bischof
> Assignee: Georg Henzler
> Priority: Minor
> Attachments: tags-in-html-rendering.png
>
>
> Hi,
>
> i configured a generalchecks.DiskSpaceCheck with tags
> {code:java}
> //config
> org.apache.felix.hc.generalchecks.DiskSpaceCheck~test2:
> hc.name: myTest222
> hc.tags: [system,system_memory,dings]
> diskPaths: [.]
> diskUsedThresholdWarn: 15
> diskUsedThresholdCritical: 10
> {code}
> filtering by these tags works ans shows the corrent results.
> http://localhost:8080/system/health/*.json
> [http://localhost:8080/system/health/system.json]
>
> but ins the result json the attribute "tags" isn't set properly.
> {code:java}
> {
> "overallResult": "CRITICAL",
> "results": [
> {
> "name": "myTest222",
> "status": "CRITICAL",
> "timeInMs": 2,
> "finishedAt": "2019-05-02T15:22:18.646",
> "tags": [],
> "messages": [
> {
> "status": "CRITICAL",
> "message": "Disk Usage /home/name/dev/git/fooo/health/.: 11.3% of
> 166.2GB used / 147.5GB free"
> }
> ]
> }
> ]
> }
> {code}
> With my own implementations of healthcheck this works.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)