You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by Georg Henzler <fe...@ghenzler.de> on 2021/12/07 12:16:00 UTC
Logging of HC status changes in HealthCheckResultCache
Hi Carsten,
I just came across the logging change [1]/[2] you made some time ago -
due to the fact that it also compares the toString()-representations of
the checks [3] there is a lot of noise in the log file, e.g. in my
example [4] below for the memory check that remains on the same status
but slightly changes the used memory numbers.
Would it make sense to only compare the status and for the case the
status changes, log the previous and current entry but avoid logging
toString()-changes?
(assuming that memory monitoring for graphs etc. happens in an external
system)
-Georg
[1] https://issues.apache.org/jira/browse/FELIX-6447
[2]
https://github.com/apache/felix-dev/commit/337d2add5f7aefbd73633f77219cc11cb3931ac7
[3]
https://github.com/apache/felix-dev/blob/337d2add5f7aefbd73633f77219cc11cb3931ac7/healthcheck/core/src/main/java/org/apache/felix/hc/core/impl/executor/HealthCheckResultCache.java#L58
[4]
07.12.2021 12:41:10.877 *INFO* [HealthCheck Memory]
org.apache.felix.hc.core.impl.executor.HealthCheckResultCache Updating
HC result for Memory : Result [status=OK, resultLog=ResultLog: [DEBUG
Free memory: 440,1MB, DEBUG Currently allocated memory: 1,1GB, DEBUG
Used memory: 649,9MB, INFO Memory Usage: 21,2% of 3,0GB maximal heap
used]]
07.12.2021 12:41:15.879 *INFO* [HealthCheck Memory]
org.apache.felix.hc.core.impl.executor.HealthCheckResultCache Updating
HC result for Memory : Result [status=OK, resultLog=ResultLog: [DEBUG
Free memory: 415,5MB, DEBUG Currently allocated memory: 1,1GB, DEBUG
Used memory: 674,5MB, INFO Memory Usage: 22,0% of 3,0GB maximal heap
used]]
07.12.2021 12:41:15.879 *INFO* [HealthCheck Memory]
org.apache.felix.hc.core.impl.executor.HealthCheckResultCache Updating
HC result for Memory : Result [status=OK, resultLog=ResultLog: [DEBUG
Free memory: 415,3MB, DEBUG Currently allocated memory: 1,1GB, DEBUG
Used memory: 674,7MB, INFO Memory Usage: 22,0% of 3,0GB maximal heap
used]]
07.12.2021 12:41:20.875 *INFO* [HealthCheck Memory]
org.apache.felix.hc.core.impl.executor.HealthCheckResultCache Updating
HC result for Memory : Result [status=OK, resultLog=ResultLog: [DEBUG
Free memory: 391,7MB, DEBUG Currently allocated memory: 1,1GB, DEBUG
Used memory: 698,3MB, INFO Memory Usage: 22,7% of 3,0GB maximal heap
used]]
07.12.2021 12:41:20.875 *INFO* [HealthCheck Memory]
org.apache.felix.hc.core.impl.executor.HealthCheckResultCache Updating
HC result for Memory : Result [status=OK, resultLog=ResultLog: [DEBUG
Free memory: 391,4MB, DEBUG Currently allocated memory: 1,1GB, DEBUG
Used memory: 698,6MB, INFO Memory Usage: 22,7% of 3,0GB maximal heap
used]]
07.12.2021 12:41:25.877 *INFO* [HealthCheck Memory]
org.apache.felix.hc.core.impl.executor.HealthCheckResultCache Updating
HC result for Memory : Result [status=OK, resultLog=ResultLog: [DEBUG
Free memory: 365,1MB, DEBUG Currently allocated memory: 1,1GB, DEBUG
Used memory: 724,9MB, INFO Memory Usage: 23,6% of 3,0GB maximal heap
used]]
07.12.2021 12:41:25.877 *INFO* [HealthCheck Memory]
org.apache.felix.hc.core.impl.executor.HealthCheckResultCache Updating
HC result for Memory : Result [status=OK, resultLog=ResultLog: [DEBUG
Free memory: 364,7MB, DEBUG Currently allocated memory: 1,1GB, DEBUG
Used memory: 725,3MB, INFO Memory Usage: 23,6% of 3,0GB maximal heap
used]]
07.12.2021 12:41:30.875 *INFO* [HealthCheck Memory]
org.apache.felix.hc.core.impl.executor.HealthCheckResultCache Updating
HC result for Memory : Result [status=OK, resultLog=ResultLog: [DEBUG
Free memory: 343,4MB, DEBUG Currently allocated memory: 1,1GB, DEBUG
Used memory: 746,6MB, INFO Memory Usage: 24,3% of 3,0GB maximal heap
used]]
07.12.2021 12:41:30.875 *INFO* [HealthCheck Memory]
org.apache.felix.hc.core.impl.executor.HealthCheckResultCache Updating
HC result for Memory : Result [status=OK, resultLog=ResultLog: [DEBUG
Free memory: 343,2MB, DEBUG Currently allocated memory: 1,1GB, DEBUG
Used memory: 746,8MB, INFO Memory Usage: 24,3% of 3,0GB maximal heap
used]]
Re: Logging of HC status changes in HealthCheckResultCache
Posted by Georg Henzler <fe...@ghenzler.de>.
Hi Carsten,
I made a little tweak to FELIX-6481 (please double-check), also in
general I made some more improvements/fixes [1], if that all works for
you like this I would create a release vote some time next week...
-Georg
[1]
https://issues.apache.org/jira/issues/?jql=project%20%3D%20FELIX%20AND%20fixVersion%20%3D%20%22healthcheck.core%202.0.12%22
https://issues.apache.org/jira/issues/?jql=project%20%3D%20FELIX%20AND%20fixVersion%20%3D%20%22healthcheck.generalchecks%203.0.0%22
On 2021-12-07 15:58, Carsten Ziegeler wrote:
> Hi,
>
> yes, makes sense to keep format - thanks, I'll create an issue for that
> one
>
> Regards
> Carsten
>
> Am 07.12.2021 um 15:50 schrieb Georg Henzler:
>> Hi Carsten,
>>
>> generally this makes sense. Currently we have the param list [1] in
>> the html rendering, I could imagine a config option
>> 'disableRequestConfiguration' - but I think it could be good to leave
>> the format option open as this is just response format and not really
>> config. WDYT?
>>
>> -Georg
>>
>> [1]
>> Supported URL parameters
>> tags:Comma-separated list of health checks tags to select - can also
>> be specified via path, e.g. /system/health/tag1,tag2.json. Exclusions
>> can be done by prepending '-' to the tag name
>> names:Comma-separated list of health check names to select. Exclusions
>> can be done by prepending '-' to the health check name
>> format:Output format, html|json|jsonp|txt - an extension in the URL
>> overrides this
>> httpStatus:Specify HTTP result code, for example CRITICAL:503 (status
>> 503 if result >= CRITICAL) or
>> CRITICAL:503,HEALTH_CHECK_ERROR:500,OK:418 for more specific HTTP
>> status
>> combineTagsWithOr:Combine tags with OR, active by default. Set to
>> false to combine with AND
>> forceInstantExecution:If true, forces instant execution by executing
>> async health checks directly, circumventing the cache (2sec by
>> default) of the HealthCheckExecutor
>> timeout:(msec) a timeout status is returned for any health check still
>> running after this period. Overrides the default HealthCheckExecutor
>> timeout
>> hcDebug:Include the DEBUG output of the Health Checks
>> callback:name of the JSONP callback function to use, defaults to
>> processHealthCheckResults
>>
>> [2]
>> https://github.com/apache/felix-dev/blob/master/healthcheck/core/src/main/java/org/apache/felix/hc/core/impl/servlet/HealthCheckExecutorServletConfiguration.java
>> On 2021-12-07 15:16, Carsten Ziegeler wrote:
>>> Hi Georg,
>>>
>>> while we are discuss HC here :) I was thinking about adding another
>>> osgi config to HealthCheckExecutorServlet to allow to lock it down
>>> and ignoring any parameters send in via http. Does that sound
>>> reasonable to you?
>>>
>>> Regards
>>> Carsten
>>>
Re: Logging of HC status changes in HealthCheckResultCache
Posted by Carsten Ziegeler <cz...@apache.org>.
Hi,
yes, makes sense to keep format - thanks, I'll create an issue for that one
Regards
Carsten
Am 07.12.2021 um 15:50 schrieb Georg Henzler:
> Hi Carsten,
>
> generally this makes sense. Currently we have the param list [1] in the
> html rendering, I could imagine a config option
> 'disableRequestConfiguration' - but I think it could be good to leave
> the format option open as this is just response format and not really
> config. WDYT?
>
> -Georg
>
> [1]
> Supported URL parameters
> tags:Comma-separated list of health checks tags to select - can also be
> specified via path, e.g. /system/health/tag1,tag2.json. Exclusions can
> be done by prepending '-' to the tag name
> names:Comma-separated list of health check names to select. Exclusions
> can be done by prepending '-' to the health check name
> format:Output format, html|json|jsonp|txt - an extension in the URL
> overrides this
> httpStatus:Specify HTTP result code, for example CRITICAL:503 (status
> 503 if result >= CRITICAL) or CRITICAL:503,HEALTH_CHECK_ERROR:500,OK:418
> for more specific HTTP status
> combineTagsWithOr:Combine tags with OR, active by default. Set to false
> to combine with AND
> forceInstantExecution:If true, forces instant execution by executing
> async health checks directly, circumventing the cache (2sec by default)
> of the HealthCheckExecutor
> timeout:(msec) a timeout status is returned for any health check still
> running after this period. Overrides the default HealthCheckExecutor
> timeout
> hcDebug:Include the DEBUG output of the Health Checks
> callback:name of the JSONP callback function to use, defaults to
> processHealthCheckResults
>
> [2]
> https://github.com/apache/felix-dev/blob/master/healthcheck/core/src/main/java/org/apache/felix/hc/core/impl/servlet/HealthCheckExecutorServletConfiguration.java
>
>
>
> On 2021-12-07 15:16, Carsten Ziegeler wrote:
>> Hi Georg,
>>
>> while we are discuss HC here :) I was thinking about adding another
>> osgi config to HealthCheckExecutorServlet to allow to lock it down
>> and ignoring any parameters send in via http. Does that sound
>> reasonable to you?
>>
>> Regards
>> Carsten
>>
--
Carsten Ziegeler
Adobe
cziegeler@apache.org
Re: Logging of HC status changes in HealthCheckResultCache
Posted by Georg Henzler <fe...@ghenzler.de>.
Hi Carsten,
generally this makes sense. Currently we have the param list [1] in the
html rendering, I could imagine a config option
'disableRequestConfiguration' - but I think it could be good to leave
the format option open as this is just response format and not really
config. WDYT?
-Georg
[1]
Supported URL parameters
tags:Comma-separated list of health checks tags to select - can also be
specified via path, e.g. /system/health/tag1,tag2.json. Exclusions can
be done by prepending '-' to the tag name
names:Comma-separated list of health check names to select. Exclusions
can be done by prepending '-' to the health check name
format:Output format, html|json|jsonp|txt - an extension in the URL
overrides this
httpStatus:Specify HTTP result code, for example CRITICAL:503 (status
503 if result >= CRITICAL) or CRITICAL:503,HEALTH_CHECK_ERROR:500,OK:418
for more specific HTTP status
combineTagsWithOr:Combine tags with OR, active by default. Set to false
to combine with AND
forceInstantExecution:If true, forces instant execution by executing
async health checks directly, circumventing the cache (2sec by default)
of the HealthCheckExecutor
timeout:(msec) a timeout status is returned for any health check still
running after this period. Overrides the default HealthCheckExecutor
timeout
hcDebug:Include the DEBUG output of the Health Checks
callback:name of the JSONP callback function to use, defaults to
processHealthCheckResults
[2]
https://github.com/apache/felix-dev/blob/master/healthcheck/core/src/main/java/org/apache/felix/hc/core/impl/servlet/HealthCheckExecutorServletConfiguration.java
On 2021-12-07 15:16, Carsten Ziegeler wrote:
> Hi Georg,
>
> while we are discuss HC here :) I was thinking about adding another
> osgi config to HealthCheckExecutorServlet to allow to lock it down
> and ignoring any parameters send in via http. Does that sound
> reasonable to you?
>
> Regards
> Carsten
>
Re: Logging of HC status changes in HealthCheckResultCache
Posted by Carsten Ziegeler <cz...@apache.org>.
Hi Georg,
while we are discuss HC here :) I was thinking about adding another osgi
config to HealthCheckExecutorServlet to allow to lock it down and
ignoring any parameters send in via http. Does that sound reasonable to you?
Regards
Carsten
Am 07.12.2021 um 15:01 schrieb Carsten Ziegeler:
> Hi Georg,
>
> yes, I think that works for me as well. However :) I think we should
> leave the current log statement in the cache and change it to debug.
> This allows to log changes to the cache in case you want to debug the
> cache.
>
> Regards
> Carsten
>
> Am 07.12.2021 um 14:53 schrieb Georg Henzler:
>> Hi Carsten,
>>
>> thinking more about it, HealthCheckResultCache is not the best place
>> for it... the monitor can be already configured to log results via
>> config "logResults" [1] (impl [2]), to achieve what you are after the
>> enum [2] could be extended for a value STATUS_CHANGES_OR_NOT_OK. The
>> advantage is that this can be configured more fine-granular per
>> monitor, also non-ok status values are logged as WARN. Would that also
>> work for you?
>>
>> -Georg
>>
>> [1]
>> https://github.com/apache/felix-dev/tree/master/healthcheck#setting-up-a-monitor-configuration
>>
>> [2]
>> https://github.com/apache/felix-dev/blob/3e5671ae7e5107f4f849ef9d5f0a89b1ba9d7439/healthcheck/core/src/main/java/org/apache/felix/hc/core/impl/monitor/HealthCheckMonitor.java#L280
>>
>> [3]
>> https://github.com/apache/felix-dev/blob/3e5671ae7e5107f4f849ef9d5f0a89b1ba9d7439/healthcheck/core/src/main/java/org/apache/felix/hc/core/impl/monitor/HealthCheckMonitor.java#L280-L315
>>
>>
>> On 2021-12-07 14:00, Carsten Ziegeler wrote:
>>> Hi,
>>>
>>> I think we should only compare toString() if the status is not OK (old
>>> and new). If a HC is not in the OK state, it is very useful to see
>>> changes in the state via toString()
>>>
>>> Regards
>>> Carsten
>>>
>>> Am 07.12.2021 um 13:16 schrieb Georg Henzler:
>>>> Hi Carsten,
>>>>
>>>> I just came across the logging change [1]/[2] you made some time ago
>>>> - due to the fact that it also compares the
>>>> toString()-representations of the checks [3] there is a lot of noise
>>>> in the log file, e.g. in my example [4] below for the memory check
>>>> that remains on the same status but slightly changes the used memory
>>>> numbers.
>>>>
>>>> Would it make sense to only compare the status and for the case the
>>>> status changes, log the previous and current entry but avoid logging
>>>> toString()-changes?
>>>> (assuming that memory monitoring for graphs etc. happens in an
>>>> external system)
>>>>
>>>> -Georg
>>>>
>>>> [1] https://issues.apache.org/jira/browse/FELIX-6447
>>>> [2]
>>>> https://github.com/apache/felix-dev/commit/337d2add5f7aefbd73633f77219cc11cb3931ac7
>>>> [3]
>>>> https://github.com/apache/felix-dev/blob/337d2add5f7aefbd73633f77219cc11cb3931ac7/healthcheck/core/src/main/java/org/apache/felix/hc/core/impl/executor/HealthCheckResultCache.java#L58
>>>> [4]
>>>> 07.12.2021 12:41:10.877 *INFO* [HealthCheck Memory]
>>>> org.apache.felix.hc.core.impl.executor.HealthCheckResultCache
>>>> Updating HC result for Memory : Result [status=OK,
>>>> resultLog=ResultLog: [DEBUG Free memory: 440,1MB, DEBUG Currently
>>>> allocated memory: 1,1GB, DEBUG Used memory: 649,9MB, INFO Memory
>>>> Usage: 21,2% of 3,0GB maximal heap used]]
>>>> 07.12.2021 12:41:15.879 *INFO* [HealthCheck Memory]
>>>> org.apache.felix.hc.core.impl.executor.HealthCheckResultCache
>>>> Updating HC result for Memory : Result [status=OK,
>>>> resultLog=ResultLog: [DEBUG Free memory: 415,5MB, DEBUG Currently
>>>> allocated memory: 1,1GB, DEBUG Used memory: 674,5MB, INFO Memory
>>>> Usage: 22,0% of 3,0GB maximal heap used]]
>>>> 07.12.2021 12:41:15.879 *INFO* [HealthCheck Memory]
>>>> org.apache.felix.hc.core.impl.executor.HealthCheckResultCache
>>>> Updating HC result for Memory : Result [status=OK,
>>>> resultLog=ResultLog: [DEBUG Free memory: 415,3MB, DEBUG Currently
>>>> allocated memory: 1,1GB, DEBUG Used memory: 674,7MB, INFO Memory
>>>> Usage: 22,0% of 3,0GB maximal heap used]]
>>>> 07.12.2021 12:41:20.875 *INFO* [HealthCheck Memory]
>>>> org.apache.felix.hc.core.impl.executor.HealthCheckResultCache
>>>> Updating HC result for Memory : Result [status=OK,
>>>> resultLog=ResultLog: [DEBUG Free memory: 391,7MB, DEBUG Currently
>>>> allocated memory: 1,1GB, DEBUG Used memory: 698,3MB, INFO Memory
>>>> Usage: 22,7% of 3,0GB maximal heap used]]
>>>> 07.12.2021 12:41:20.875 *INFO* [HealthCheck Memory]
>>>> org.apache.felix.hc.core.impl.executor.HealthCheckResultCache
>>>> Updating HC result for Memory : Result [status=OK,
>>>> resultLog=ResultLog: [DEBUG Free memory: 391,4MB, DEBUG Currently
>>>> allocated memory: 1,1GB, DEBUG Used memory: 698,6MB, INFO Memory
>>>> Usage: 22,7% of 3,0GB maximal heap used]]
>>>> 07.12.2021 12:41:25.877 *INFO* [HealthCheck Memory]
>>>> org.apache.felix.hc.core.impl.executor.HealthCheckResultCache
>>>> Updating HC result for Memory : Result [status=OK,
>>>> resultLog=ResultLog: [DEBUG Free memory: 365,1MB, DEBUG Currently
>>>> allocated memory: 1,1GB, DEBUG Used memory: 724,9MB, INFO Memory
>>>> Usage: 23,6% of 3,0GB maximal heap used]]
>>>> 07.12.2021 12:41:25.877 *INFO* [HealthCheck Memory]
>>>> org.apache.felix.hc.core.impl.executor.HealthCheckResultCache
>>>> Updating HC result for Memory : Result [status=OK,
>>>> resultLog=ResultLog: [DEBUG Free memory: 364,7MB, DEBUG Currently
>>>> allocated memory: 1,1GB, DEBUG Used memory: 725,3MB, INFO Memory
>>>> Usage: 23,6% of 3,0GB maximal heap used]]
>>>> 07.12.2021 12:41:30.875 *INFO* [HealthCheck Memory]
>>>> org.apache.felix.hc.core.impl.executor.HealthCheckResultCache
>>>> Updating HC result for Memory : Result [status=OK,
>>>> resultLog=ResultLog: [DEBUG Free memory: 343,4MB, DEBUG Currently
>>>> allocated memory: 1,1GB, DEBUG Used memory: 746,6MB, INFO Memory
>>>> Usage: 24,3% of 3,0GB maximal heap used]]
>>>> 07.12.2021 12:41:30.875 *INFO* [HealthCheck Memory]
>>>> org.apache.felix.hc.core.impl.executor.HealthCheckResultCache
>>>> Updating HC result for Memory : Result [status=OK,
>>>> resultLog=ResultLog: [DEBUG Free memory: 343,2MB, DEBUG Currently
>>>> allocated memory: 1,1GB, DEBUG Used memory: 746,8MB, INFO Memory
>>>> Usage: 24,3% of 3,0GB maximal heap used]]
>
--
Carsten Ziegeler
Adobe
cziegeler@apache.org
Re: Logging of HC status changes in HealthCheckResultCache
Posted by Georg Henzler <fe...@ghenzler.de>.
Hi Carsten,
makes sense - I created FELIX-6480 for it.
-Georg
On 2021-12-07 15:01, Carsten Ziegeler wrote:
> Hi Georg,
>
> yes, I think that works for me as well. However :) I think we should
> leave the current log statement in the cache and change it to debug.
> This allows to log changes to the cache in case you want to debug the
> cache.
>
> Regards
> Carsten
>
> Am 07.12.2021 um 14:53 schrieb Georg Henzler:
>> Hi Carsten,
>>
>> thinking more about it, HealthCheckResultCache is not the best place
>> for it... the monitor can be already configured to log results via
>> config "logResults" [1] (impl [2]), to achieve what you are after the
>> enum [2] could be extended for a value STATUS_CHANGES_OR_NOT_OK. The
>> advantage is that this can be configured more fine-granular per
>> monitor, also non-ok status values are logged as WARN. Would that also
>> work for you?
>>
>> -Georg
>>
>> [1]
>> https://github.com/apache/felix-dev/tree/master/healthcheck#setting-up-a-monitor-configuration
>> [2]
>> https://github.com/apache/felix-dev/blob/3e5671ae7e5107f4f849ef9d5f0a89b1ba9d7439/healthcheck/core/src/main/java/org/apache/felix/hc/core/impl/monitor/HealthCheckMonitor.java#L280
>> [3]
>> https://github.com/apache/felix-dev/blob/3e5671ae7e5107f4f849ef9d5f0a89b1ba9d7439/healthcheck/core/src/main/java/org/apache/felix/hc/core/impl/monitor/HealthCheckMonitor.java#L280-L315
>> On 2021-12-07 14:00, Carsten Ziegeler wrote:
>>> Hi,
>>>
>>> I think we should only compare toString() if the status is not OK
>>> (old
>>> and new). If a HC is not in the OK state, it is very useful to see
>>> changes in the state via toString()
>>>
>>> Regards
>>> Carsten
>>>
>>> Am 07.12.2021 um 13:16 schrieb Georg Henzler:
>>>> Hi Carsten,
>>>>
>>>> I just came across the logging change [1]/[2] you made some time ago
>>>> - due to the fact that it also compares the
>>>> toString()-representations of the checks [3] there is a lot of noise
>>>> in the log file, e.g. in my example [4] below for the memory check
>>>> that remains on the same status but slightly changes the used memory
>>>> numbers.
>>>>
>>>> Would it make sense to only compare the status and for the case the
>>>> status changes, log the previous and current entry but avoid logging
>>>> toString()-changes?
>>>> (assuming that memory monitoring for graphs etc. happens in an
>>>> external system)
>>>>
>>>> -Georg
>>>>
>>>> [1] https://issues.apache.org/jira/browse/FELIX-6447
>>>> [2]
>>>> https://github.com/apache/felix-dev/commit/337d2add5f7aefbd73633f77219cc11cb3931ac7
>>>> [3]
>>>> https://github.com/apache/felix-dev/blob/337d2add5f7aefbd73633f77219cc11cb3931ac7/healthcheck/core/src/main/java/org/apache/felix/hc/core/impl/executor/HealthCheckResultCache.java#L58
>>>> [4]
>>>> 07.12.2021 12:41:10.877 *INFO* [HealthCheck Memory]
>>>> org.apache.felix.hc.core.impl.executor.HealthCheckResultCache
>>>> Updating HC result for Memory : Result [status=OK,
>>>> resultLog=ResultLog: [DEBUG Free memory: 440,1MB, DEBUG Currently
>>>> allocated memory: 1,1GB, DEBUG Used memory: 649,9MB, INFO Memory
>>>> Usage: 21,2% of 3,0GB maximal heap used]]
>>>> 07.12.2021 12:41:15.879 *INFO* [HealthCheck Memory]
>>>> org.apache.felix.hc.core.impl.executor.HealthCheckResultCache
>>>> Updating HC result for Memory : Result [status=OK,
>>>> resultLog=ResultLog: [DEBUG Free memory: 415,5MB, DEBUG Currently
>>>> allocated memory: 1,1GB, DEBUG Used memory: 674,5MB, INFO Memory
>>>> Usage: 22,0% of 3,0GB maximal heap used]]
>>>> 07.12.2021 12:41:15.879 *INFO* [HealthCheck Memory]
>>>> org.apache.felix.hc.core.impl.executor.HealthCheckResultCache
>>>> Updating HC result for Memory : Result [status=OK,
>>>> resultLog=ResultLog: [DEBUG Free memory: 415,3MB, DEBUG Currently
>>>> allocated memory: 1,1GB, DEBUG Used memory: 674,7MB, INFO Memory
>>>> Usage: 22,0% of 3,0GB maximal heap used]]
>>>> 07.12.2021 12:41:20.875 *INFO* [HealthCheck Memory]
>>>> org.apache.felix.hc.core.impl.executor.HealthCheckResultCache
>>>> Updating HC result for Memory : Result [status=OK,
>>>> resultLog=ResultLog: [DEBUG Free memory: 391,7MB, DEBUG Currently
>>>> allocated memory: 1,1GB, DEBUG Used memory: 698,3MB, INFO Memory
>>>> Usage: 22,7% of 3,0GB maximal heap used]]
>>>> 07.12.2021 12:41:20.875 *INFO* [HealthCheck Memory]
>>>> org.apache.felix.hc.core.impl.executor.HealthCheckResultCache
>>>> Updating HC result for Memory : Result [status=OK,
>>>> resultLog=ResultLog: [DEBUG Free memory: 391,4MB, DEBUG Currently
>>>> allocated memory: 1,1GB, DEBUG Used memory: 698,6MB, INFO Memory
>>>> Usage: 22,7% of 3,0GB maximal heap used]]
>>>> 07.12.2021 12:41:25.877 *INFO* [HealthCheck Memory]
>>>> org.apache.felix.hc.core.impl.executor.HealthCheckResultCache
>>>> Updating HC result for Memory : Result [status=OK,
>>>> resultLog=ResultLog: [DEBUG Free memory: 365,1MB, DEBUG Currently
>>>> allocated memory: 1,1GB, DEBUG Used memory: 724,9MB, INFO Memory
>>>> Usage: 23,6% of 3,0GB maximal heap used]]
>>>> 07.12.2021 12:41:25.877 *INFO* [HealthCheck Memory]
>>>> org.apache.felix.hc.core.impl.executor.HealthCheckResultCache
>>>> Updating HC result for Memory : Result [status=OK,
>>>> resultLog=ResultLog: [DEBUG Free memory: 364,7MB, DEBUG Currently
>>>> allocated memory: 1,1GB, DEBUG Used memory: 725,3MB, INFO Memory
>>>> Usage: 23,6% of 3,0GB maximal heap used]]
>>>> 07.12.2021 12:41:30.875 *INFO* [HealthCheck Memory]
>>>> org.apache.felix.hc.core.impl.executor.HealthCheckResultCache
>>>> Updating HC result for Memory : Result [status=OK,
>>>> resultLog=ResultLog: [DEBUG Free memory: 343,4MB, DEBUG Currently
>>>> allocated memory: 1,1GB, DEBUG Used memory: 746,6MB, INFO Memory
>>>> Usage: 24,3% of 3,0GB maximal heap used]]
>>>> 07.12.2021 12:41:30.875 *INFO* [HealthCheck Memory]
>>>> org.apache.felix.hc.core.impl.executor.HealthCheckResultCache
>>>> Updating HC result for Memory : Result [status=OK,
>>>> resultLog=ResultLog: [DEBUG Free memory: 343,2MB, DEBUG Currently
>>>> allocated memory: 1,1GB, DEBUG Used memory: 746,8MB, INFO Memory
>>>> Usage: 24,3% of 3,0GB maximal heap used]]
Re: Logging of HC status changes in HealthCheckResultCache
Posted by Carsten Ziegeler <cz...@apache.org>.
Hi Georg,
yes, I think that works for me as well. However :) I think we should
leave the current log statement in the cache and change it to debug.
This allows to log changes to the cache in case you want to debug the cache.
Regards
Carsten
Am 07.12.2021 um 14:53 schrieb Georg Henzler:
> Hi Carsten,
>
> thinking more about it, HealthCheckResultCache is not the best place for
> it... the monitor can be already configured to log results via config
> "logResults" [1] (impl [2]), to achieve what you are after the enum [2]
> could be extended for a value STATUS_CHANGES_OR_NOT_OK. The advantage is
> that this can be configured more fine-granular per monitor, also non-ok
> status values are logged as WARN. Would that also work for you?
>
> -Georg
>
> [1]
> https://github.com/apache/felix-dev/tree/master/healthcheck#setting-up-a-monitor-configuration
>
> [2]
> https://github.com/apache/felix-dev/blob/3e5671ae7e5107f4f849ef9d5f0a89b1ba9d7439/healthcheck/core/src/main/java/org/apache/felix/hc/core/impl/monitor/HealthCheckMonitor.java#L280
>
> [3]
> https://github.com/apache/felix-dev/blob/3e5671ae7e5107f4f849ef9d5f0a89b1ba9d7439/healthcheck/core/src/main/java/org/apache/felix/hc/core/impl/monitor/HealthCheckMonitor.java#L280-L315
>
>
> On 2021-12-07 14:00, Carsten Ziegeler wrote:
>> Hi,
>>
>> I think we should only compare toString() if the status is not OK (old
>> and new). If a HC is not in the OK state, it is very useful to see
>> changes in the state via toString()
>>
>> Regards
>> Carsten
>>
>> Am 07.12.2021 um 13:16 schrieb Georg Henzler:
>>> Hi Carsten,
>>>
>>> I just came across the logging change [1]/[2] you made some time ago
>>> - due to the fact that it also compares the
>>> toString()-representations of the checks [3] there is a lot of noise
>>> in the log file, e.g. in my example [4] below for the memory check
>>> that remains on the same status but slightly changes the used memory
>>> numbers.
>>>
>>> Would it make sense to only compare the status and for the case the
>>> status changes, log the previous and current entry but avoid logging
>>> toString()-changes?
>>> (assuming that memory monitoring for graphs etc. happens in an
>>> external system)
>>>
>>> -Georg
>>>
>>> [1] https://issues.apache.org/jira/browse/FELIX-6447
>>> [2]
>>> https://github.com/apache/felix-dev/commit/337d2add5f7aefbd73633f77219cc11cb3931ac7
>>> [3]
>>> https://github.com/apache/felix-dev/blob/337d2add5f7aefbd73633f77219cc11cb3931ac7/healthcheck/core/src/main/java/org/apache/felix/hc/core/impl/executor/HealthCheckResultCache.java#L58
>>> [4]
>>> 07.12.2021 12:41:10.877 *INFO* [HealthCheck Memory]
>>> org.apache.felix.hc.core.impl.executor.HealthCheckResultCache
>>> Updating HC result for Memory : Result [status=OK,
>>> resultLog=ResultLog: [DEBUG Free memory: 440,1MB, DEBUG Currently
>>> allocated memory: 1,1GB, DEBUG Used memory: 649,9MB, INFO Memory
>>> Usage: 21,2% of 3,0GB maximal heap used]]
>>> 07.12.2021 12:41:15.879 *INFO* [HealthCheck Memory]
>>> org.apache.felix.hc.core.impl.executor.HealthCheckResultCache
>>> Updating HC result for Memory : Result [status=OK,
>>> resultLog=ResultLog: [DEBUG Free memory: 415,5MB, DEBUG Currently
>>> allocated memory: 1,1GB, DEBUG Used memory: 674,5MB, INFO Memory
>>> Usage: 22,0% of 3,0GB maximal heap used]]
>>> 07.12.2021 12:41:15.879 *INFO* [HealthCheck Memory]
>>> org.apache.felix.hc.core.impl.executor.HealthCheckResultCache
>>> Updating HC result for Memory : Result [status=OK,
>>> resultLog=ResultLog: [DEBUG Free memory: 415,3MB, DEBUG Currently
>>> allocated memory: 1,1GB, DEBUG Used memory: 674,7MB, INFO Memory
>>> Usage: 22,0% of 3,0GB maximal heap used]]
>>> 07.12.2021 12:41:20.875 *INFO* [HealthCheck Memory]
>>> org.apache.felix.hc.core.impl.executor.HealthCheckResultCache
>>> Updating HC result for Memory : Result [status=OK,
>>> resultLog=ResultLog: [DEBUG Free memory: 391,7MB, DEBUG Currently
>>> allocated memory: 1,1GB, DEBUG Used memory: 698,3MB, INFO Memory
>>> Usage: 22,7% of 3,0GB maximal heap used]]
>>> 07.12.2021 12:41:20.875 *INFO* [HealthCheck Memory]
>>> org.apache.felix.hc.core.impl.executor.HealthCheckResultCache
>>> Updating HC result for Memory : Result [status=OK,
>>> resultLog=ResultLog: [DEBUG Free memory: 391,4MB, DEBUG Currently
>>> allocated memory: 1,1GB, DEBUG Used memory: 698,6MB, INFO Memory
>>> Usage: 22,7% of 3,0GB maximal heap used]]
>>> 07.12.2021 12:41:25.877 *INFO* [HealthCheck Memory]
>>> org.apache.felix.hc.core.impl.executor.HealthCheckResultCache
>>> Updating HC result for Memory : Result [status=OK,
>>> resultLog=ResultLog: [DEBUG Free memory: 365,1MB, DEBUG Currently
>>> allocated memory: 1,1GB, DEBUG Used memory: 724,9MB, INFO Memory
>>> Usage: 23,6% of 3,0GB maximal heap used]]
>>> 07.12.2021 12:41:25.877 *INFO* [HealthCheck Memory]
>>> org.apache.felix.hc.core.impl.executor.HealthCheckResultCache
>>> Updating HC result for Memory : Result [status=OK,
>>> resultLog=ResultLog: [DEBUG Free memory: 364,7MB, DEBUG Currently
>>> allocated memory: 1,1GB, DEBUG Used memory: 725,3MB, INFO Memory
>>> Usage: 23,6% of 3,0GB maximal heap used]]
>>> 07.12.2021 12:41:30.875 *INFO* [HealthCheck Memory]
>>> org.apache.felix.hc.core.impl.executor.HealthCheckResultCache
>>> Updating HC result for Memory : Result [status=OK,
>>> resultLog=ResultLog: [DEBUG Free memory: 343,4MB, DEBUG Currently
>>> allocated memory: 1,1GB, DEBUG Used memory: 746,6MB, INFO Memory
>>> Usage: 24,3% of 3,0GB maximal heap used]]
>>> 07.12.2021 12:41:30.875 *INFO* [HealthCheck Memory]
>>> org.apache.felix.hc.core.impl.executor.HealthCheckResultCache
>>> Updating HC result for Memory : Result [status=OK,
>>> resultLog=ResultLog: [DEBUG Free memory: 343,2MB, DEBUG Currently
>>> allocated memory: 1,1GB, DEBUG Used memory: 746,8MB, INFO Memory
>>> Usage: 24,3% of 3,0GB maximal heap used]]
--
Carsten Ziegeler
Adobe
cziegeler@apache.org
Re: Logging of HC status changes in HealthCheckResultCache
Posted by Georg Henzler <fe...@ghenzler.de>.
Hi Carsten,
thinking more about it, HealthCheckResultCache is not the best place for
it... the monitor can be already configured to log results via config
"logResults" [1] (impl [2]), to achieve what you are after the enum [2]
could be extended for a value STATUS_CHANGES_OR_NOT_OK. The advantage is
that this can be configured more fine-granular per monitor, also non-ok
status values are logged as WARN. Would that also work for you?
-Georg
[1]
https://github.com/apache/felix-dev/tree/master/healthcheck#setting-up-a-monitor-configuration
[2]
https://github.com/apache/felix-dev/blob/3e5671ae7e5107f4f849ef9d5f0a89b1ba9d7439/healthcheck/core/src/main/java/org/apache/felix/hc/core/impl/monitor/HealthCheckMonitor.java#L280
[3]
https://github.com/apache/felix-dev/blob/3e5671ae7e5107f4f849ef9d5f0a89b1ba9d7439/healthcheck/core/src/main/java/org/apache/felix/hc/core/impl/monitor/HealthCheckMonitor.java#L280-L315
On 2021-12-07 14:00, Carsten Ziegeler wrote:
> Hi,
>
> I think we should only compare toString() if the status is not OK (old
> and new). If a HC is not in the OK state, it is very useful to see
> changes in the state via toString()
>
> Regards
> Carsten
>
> Am 07.12.2021 um 13:16 schrieb Georg Henzler:
>> Hi Carsten,
>>
>> I just came across the logging change [1]/[2] you made some time ago -
>> due to the fact that it also compares the toString()-representations
>> of the checks [3] there is a lot of noise in the log file, e.g. in my
>> example [4] below for the memory check that remains on the same status
>> but slightly changes the used memory numbers.
>>
>> Would it make sense to only compare the status and for the case the
>> status changes, log the previous and current entry but avoid logging
>> toString()-changes?
>> (assuming that memory monitoring for graphs etc. happens in an
>> external system)
>>
>> -Georg
>>
>> [1] https://issues.apache.org/jira/browse/FELIX-6447
>> [2]
>> https://github.com/apache/felix-dev/commit/337d2add5f7aefbd73633f77219cc11cb3931ac7
>> [3]
>> https://github.com/apache/felix-dev/blob/337d2add5f7aefbd73633f77219cc11cb3931ac7/healthcheck/core/src/main/java/org/apache/felix/hc/core/impl/executor/HealthCheckResultCache.java#L58
>> [4]
>> 07.12.2021 12:41:10.877 *INFO* [HealthCheck Memory]
>> org.apache.felix.hc.core.impl.executor.HealthCheckResultCache Updating
>> HC result for Memory : Result [status=OK, resultLog=ResultLog: [DEBUG
>> Free memory: 440,1MB, DEBUG Currently allocated memory: 1,1GB, DEBUG
>> Used memory: 649,9MB, INFO Memory Usage: 21,2% of 3,0GB maximal heap
>> used]]
>> 07.12.2021 12:41:15.879 *INFO* [HealthCheck Memory]
>> org.apache.felix.hc.core.impl.executor.HealthCheckResultCache Updating
>> HC result for Memory : Result [status=OK, resultLog=ResultLog: [DEBUG
>> Free memory: 415,5MB, DEBUG Currently allocated memory: 1,1GB, DEBUG
>> Used memory: 674,5MB, INFO Memory Usage: 22,0% of 3,0GB maximal heap
>> used]]
>> 07.12.2021 12:41:15.879 *INFO* [HealthCheck Memory]
>> org.apache.felix.hc.core.impl.executor.HealthCheckResultCache Updating
>> HC result for Memory : Result [status=OK, resultLog=ResultLog: [DEBUG
>> Free memory: 415,3MB, DEBUG Currently allocated memory: 1,1GB, DEBUG
>> Used memory: 674,7MB, INFO Memory Usage: 22,0% of 3,0GB maximal heap
>> used]]
>> 07.12.2021 12:41:20.875 *INFO* [HealthCheck Memory]
>> org.apache.felix.hc.core.impl.executor.HealthCheckResultCache Updating
>> HC result for Memory : Result [status=OK, resultLog=ResultLog: [DEBUG
>> Free memory: 391,7MB, DEBUG Currently allocated memory: 1,1GB, DEBUG
>> Used memory: 698,3MB, INFO Memory Usage: 22,7% of 3,0GB maximal heap
>> used]]
>> 07.12.2021 12:41:20.875 *INFO* [HealthCheck Memory]
>> org.apache.felix.hc.core.impl.executor.HealthCheckResultCache Updating
>> HC result for Memory : Result [status=OK, resultLog=ResultLog: [DEBUG
>> Free memory: 391,4MB, DEBUG Currently allocated memory: 1,1GB, DEBUG
>> Used memory: 698,6MB, INFO Memory Usage: 22,7% of 3,0GB maximal heap
>> used]]
>> 07.12.2021 12:41:25.877 *INFO* [HealthCheck Memory]
>> org.apache.felix.hc.core.impl.executor.HealthCheckResultCache Updating
>> HC result for Memory : Result [status=OK, resultLog=ResultLog: [DEBUG
>> Free memory: 365,1MB, DEBUG Currently allocated memory: 1,1GB, DEBUG
>> Used memory: 724,9MB, INFO Memory Usage: 23,6% of 3,0GB maximal heap
>> used]]
>> 07.12.2021 12:41:25.877 *INFO* [HealthCheck Memory]
>> org.apache.felix.hc.core.impl.executor.HealthCheckResultCache Updating
>> HC result for Memory : Result [status=OK, resultLog=ResultLog: [DEBUG
>> Free memory: 364,7MB, DEBUG Currently allocated memory: 1,1GB, DEBUG
>> Used memory: 725,3MB, INFO Memory Usage: 23,6% of 3,0GB maximal heap
>> used]]
>> 07.12.2021 12:41:30.875 *INFO* [HealthCheck Memory]
>> org.apache.felix.hc.core.impl.executor.HealthCheckResultCache Updating
>> HC result for Memory : Result [status=OK, resultLog=ResultLog: [DEBUG
>> Free memory: 343,4MB, DEBUG Currently allocated memory: 1,1GB, DEBUG
>> Used memory: 746,6MB, INFO Memory Usage: 24,3% of 3,0GB maximal heap
>> used]]
>> 07.12.2021 12:41:30.875 *INFO* [HealthCheck Memory]
>> org.apache.felix.hc.core.impl.executor.HealthCheckResultCache Updating
>> HC result for Memory : Result [status=OK, resultLog=ResultLog: [DEBUG
>> Free memory: 343,2MB, DEBUG Currently allocated memory: 1,1GB, DEBUG
>> Used memory: 746,8MB, INFO Memory Usage: 24,3% of 3,0GB maximal heap
>> used]]
Re: Logging of HC status changes in HealthCheckResultCache
Posted by Carsten Ziegeler <cz...@apache.org>.
Hi,
I think we should only compare toString() if the status is not OK (old
and new). If a HC is not in the OK state, it is very useful to see
changes in the state via toString()
Regards
Carsten
Am 07.12.2021 um 13:16 schrieb Georg Henzler:
> Hi Carsten,
>
> I just came across the logging change [1]/[2] you made some time ago -
> due to the fact that it also compares the toString()-representations of
> the checks [3] there is a lot of noise in the log file, e.g. in my
> example [4] below for the memory check that remains on the same status
> but slightly changes the used memory numbers.
>
> Would it make sense to only compare the status and for the case the
> status changes, log the previous and current entry but avoid logging
> toString()-changes?
> (assuming that memory monitoring for graphs etc. happens in an external
> system)
>
> -Georg
>
> [1] https://issues.apache.org/jira/browse/FELIX-6447
> [2]
> https://github.com/apache/felix-dev/commit/337d2add5f7aefbd73633f77219cc11cb3931ac7
>
> [3]
> https://github.com/apache/felix-dev/blob/337d2add5f7aefbd73633f77219cc11cb3931ac7/healthcheck/core/src/main/java/org/apache/felix/hc/core/impl/executor/HealthCheckResultCache.java#L58
>
> [4]
> 07.12.2021 12:41:10.877 *INFO* [HealthCheck Memory]
> org.apache.felix.hc.core.impl.executor.HealthCheckResultCache Updating
> HC result for Memory : Result [status=OK, resultLog=ResultLog: [DEBUG
> Free memory: 440,1MB, DEBUG Currently allocated memory: 1,1GB, DEBUG
> Used memory: 649,9MB, INFO Memory Usage: 21,2% of 3,0GB maximal heap used]]
> 07.12.2021 12:41:15.879 *INFO* [HealthCheck Memory]
> org.apache.felix.hc.core.impl.executor.HealthCheckResultCache Updating
> HC result for Memory : Result [status=OK, resultLog=ResultLog: [DEBUG
> Free memory: 415,5MB, DEBUG Currently allocated memory: 1,1GB, DEBUG
> Used memory: 674,5MB, INFO Memory Usage: 22,0% of 3,0GB maximal heap used]]
> 07.12.2021 12:41:15.879 *INFO* [HealthCheck Memory]
> org.apache.felix.hc.core.impl.executor.HealthCheckResultCache Updating
> HC result for Memory : Result [status=OK, resultLog=ResultLog: [DEBUG
> Free memory: 415,3MB, DEBUG Currently allocated memory: 1,1GB, DEBUG
> Used memory: 674,7MB, INFO Memory Usage: 22,0% of 3,0GB maximal heap used]]
> 07.12.2021 12:41:20.875 *INFO* [HealthCheck Memory]
> org.apache.felix.hc.core.impl.executor.HealthCheckResultCache Updating
> HC result for Memory : Result [status=OK, resultLog=ResultLog: [DEBUG
> Free memory: 391,7MB, DEBUG Currently allocated memory: 1,1GB, DEBUG
> Used memory: 698,3MB, INFO Memory Usage: 22,7% of 3,0GB maximal heap used]]
> 07.12.2021 12:41:20.875 *INFO* [HealthCheck Memory]
> org.apache.felix.hc.core.impl.executor.HealthCheckResultCache Updating
> HC result for Memory : Result [status=OK, resultLog=ResultLog: [DEBUG
> Free memory: 391,4MB, DEBUG Currently allocated memory: 1,1GB, DEBUG
> Used memory: 698,6MB, INFO Memory Usage: 22,7% of 3,0GB maximal heap used]]
> 07.12.2021 12:41:25.877 *INFO* [HealthCheck Memory]
> org.apache.felix.hc.core.impl.executor.HealthCheckResultCache Updating
> HC result for Memory : Result [status=OK, resultLog=ResultLog: [DEBUG
> Free memory: 365,1MB, DEBUG Currently allocated memory: 1,1GB, DEBUG
> Used memory: 724,9MB, INFO Memory Usage: 23,6% of 3,0GB maximal heap used]]
> 07.12.2021 12:41:25.877 *INFO* [HealthCheck Memory]
> org.apache.felix.hc.core.impl.executor.HealthCheckResultCache Updating
> HC result for Memory : Result [status=OK, resultLog=ResultLog: [DEBUG
> Free memory: 364,7MB, DEBUG Currently allocated memory: 1,1GB, DEBUG
> Used memory: 725,3MB, INFO Memory Usage: 23,6% of 3,0GB maximal heap used]]
> 07.12.2021 12:41:30.875 *INFO* [HealthCheck Memory]
> org.apache.felix.hc.core.impl.executor.HealthCheckResultCache Updating
> HC result for Memory : Result [status=OK, resultLog=ResultLog: [DEBUG
> Free memory: 343,4MB, DEBUG Currently allocated memory: 1,1GB, DEBUG
> Used memory: 746,6MB, INFO Memory Usage: 24,3% of 3,0GB maximal heap used]]
> 07.12.2021 12:41:30.875 *INFO* [HealthCheck Memory]
> org.apache.felix.hc.core.impl.executor.HealthCheckResultCache Updating
> HC result for Memory : Result [status=OK, resultLog=ResultLog: [DEBUG
> Free memory: 343,2MB, DEBUG Currently allocated memory: 1,1GB, DEBUG
> Used memory: 746,8MB, INFO Memory Usage: 24,3% of 3,0GB maximal heap used]]
--
Carsten Ziegeler
Adobe
cziegeler@apache.org