Weird values for GC PS Marksweep / time collecting garbage

CMK version: Enterprise 2.1.0p38
OS version: Ubuntu 20.04

(the deployed mk_jolokia agent is also 2.1.0p38 / Java is v 17)

I am working with an inherited Check_MK installation. The mk_jolokia data for JVM GC PS MarkSweep shows a baseline metric of 200 - 500%. When a JVM goes into cycles of full GC, this metric rises to more than 4000%.

Leaving aside the fact that the absolute value is nonsense, the relative values do reflect the underlying health. However Check_MK does not allow me to set a threshold greater than 101%.

Has anyone else encountered this?

Is there a solution?

Yes i got the same.
As i understand code, it not a absolute value, but a rate.

i understand like that
Garbage collections: 0.01/s mean that it does 0.01 GC collector/s more than last period (60s)
Time spent collecting garbage: 2.12 % mean it increase time in GC of 2.12% comparing to last period.

It explain why it can higher than 100%

But i still cannot use it as the wato doesn’t allow more than 100%.

I end up by writing a custom plugin for Garbage Collector

Thank you.

Your confirmation confirms that I’m not completely crazy.

i’ve just done a pull request for it

I’ve spend a bit more time on it, and i was wrong in interpretation on code.
There a still a bug in checkMk, but it’s a absolute value

what they do

they calculate a rate for connection_time, express in ms/sec and convert in percent by *10, what is wrong

250ms/sec should be 25%, not 2500% as it calculated now

i’ve closed other pull request, and create a new one to fix this

to be able to fix on current version, i’ve done a mkp with just the file modified in the path
local/share/check_mk/checks/jolokia_jvm_garbagecollectors

and it will override default one.

1 Like

Is this working for you?

I had already tried changing this (I went with / 10 rather than * 0.1) and it seemed to have no impact at all on the metrics reported, neither in the status message nor in the RRD graphs.

Yes it’s working, i’ve to put in
local/share/check_mk/checks/jolokia_jvm_garbagecollectors

restart checkMk.
i use a distributed system, it wouldn’t activate by default on all site, i’ve to force a activate on all site by editing a user as workaround

I had already tried the same thing (apart from using / 10.0 rather than * 0.10) hence my reason for asking, I suspect there may be something wrong with how I deployed this:

First attempt

  1. created a backup of var/check_mk/precompiled_checks/builtin/jolokia_jvm_garbagecollectors in the same dir (jolokia_jvm_garbagecollectors-YYYYMMDD)
  2. edited jolokia_jvm_garbagecollectors to change calculation
  3. removed corresponding file in var/check_mk/precompiled_checks/builtin/

This had no impact - on checking, the ā€œpre-compiledā€ code appears to have been generated rom the backup file rather tha new file…

Second attempt
As above, but I placed the backup file in /root. However the outcome was the same.

Third attempt
I put a copy of the modified file in local/share/check_mk/checks/, deleted var/check_mk/precompiled_checks/builtin/

This seems to have worked. Is there canonical documentation on how this should be done?

The best instance talking about that so far is here:

I do think that there is something more official, but I can not able to find it yet.

you don’t need to delete the original in var/…
What you put in local overirde the default checkmk one, it seem to work for quite all plugin i overrided (service now, python and gc_collector)

Otherwise, i mostly read the code for the documentation.

This is now fixed in last version

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.