I'm having trouble with what seems to result from non-deterministic metric
key generation occurring when using JMX export.
Prior to upgrading our JVM version I'm receiving two metrics (ParNew and
ConcurrentMarkSweep) under the following key:
java_lang_GarbageCollector_CollectionCount
Whereas after switching to a newer JVM version Prometheus generates two
distinct metrics:
java_lang_G1_Young_Generation_CollectionCount
java_lang_G1_Old_Generation_CollectionCount
Any ideas what's causing this and how can I make key generation
deterministic?
Below is an extract of what jmx_exporter outputs when I do a manual
scraping.
It looks like JMX bean property order affects metric key naming.
jmx_exporter % grep CollectionCount scrape1.txt
java.lang{type=GarbageCollector, name=ParNew}[]CollectionCount: 10659
java.lang{type=GarbageCollector,
name=ConcurrentMarkSweep}[]CollectionCount: 24
In Prometheus this results in java_lang_GarbageCollector_CollectionCount
% grep CollectionCount scrape2.txt
java.lang{name=G1 Young Generation,
type=GarbageCollector}[]CollectionCount: 811
java.lang{name=G1 Old Generation, type=GarbageCollector}[]CollectionCount: 0
--
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/34204c97-94af-46da-a7e7-d2df326e91da%40googlegroups.com.