On Wed, 25 Nov 2020 at 13:35, Tigran <[email protected]> wrote:
> Hello,
>
> I am running a k8s cluster with 2 instances, and I noticed that I have a
> lot of difference between this two metrics, I would like to undertand why
> they return a different value.
>
> *metrics from jvm_memory_bytes_used{service="x", area="heap"} (instance 1
> and 2)*
>
> *java_lang_memory_heapmemoryusage_used{service="x"} (intsance 1 and 2)*
>
>
> The difference is ~20mb for the first instance of x and ~10mb for the
> second.
>
> I am using jmx_prometheus_javaagent:0.14.0 exporter in a tomcat runing
> azul jdk
>
Most likely a race due to them being fetched at slightly different times in
the scrape, as the value is coming from the exact same mBean. You can drop
all the java_lang stuff when using the jmx exporter,
as jvm_memory_bytes_used and friends already provide you with that out of
the box and is a better structured metric.
--
Brian Brazil
www.robustperception.io
--
You received this message because you are subscribed to the Google Groups
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/prometheus-users/CAHJKeLp%3DUJa%3DxOqyPigvYbw%2BiiR07fbeYj7QXH%3D3rsPuKTp3zQ%40mail.gmail.com.