JVM probes

JVM probes are defined in the instrumentation module.

Available JVM probes

There are common properties for configuring all JVM probes, including:

  • class - the full class name of the instrumentation probe to instantiate, for example, info.magnolia.services.instrumentation.probes.jvm.ClassLoadingProbe.

  • enabled - a flag, either true or false, true indicating the probe is active and collecting metrics and false if not.

All JVM probes are configured in the Instrumentation module. Probes should be added in /modules/instrumentation/config/probes and specify the class property (required) and enabled property (optional). JVM probes defined in the instrumentation module are created or modified when the instrumentation module is restarted or changed.
Table 1. Common properties
Property Default Description

class

The fully qualified class name of the probe to instantiate.

The class must implement the info.magnolia.services.instrumentation.probes.LaunchableProbe interface.

enabled

true

Flag controlling if the probe is active and can provide measurements (true) or is disabled and not providing measurements (false).

JVMProbe

The JVMProbe will provide details on the running JVM, including version, vendor and runtime description.

Configuration properties

Property Description Required

class

Should be info.magnolia.services.instrumentation.probes.jvm.JVMProbe.

Metrics

Metric Description

jvm_info

JVM details.

Labels

Label Metrics Description

version

jvm_info

Something like "11.0.8+10", actual value depends on the JVM in use.

vendor

jvm_info

Something like "Yoyodyne Propulsion Systems Corporation", actual value depends on the JVM in use.

runtime

jvm_info

Something like "OpenJDK Runtime Environment", actual value depends on the JVM in use.

ClassLoadingProbe

The ClassLoadingProbe probe will provide measurements of the number of classes loaded and unloaded in the JVM running Magnolia. The metric will change when the JVM loads and unloads classes.

Configuration properties

Property Description Required

class

Should be info.magnolia.services.instrumentation.probes.jvm.ClassLoadingProbe.

Metrics

The jvm_classes_loaded, jvm_classes_loaded_total and jvm_classes_unloaded_total metrics are labelled with the default Prometheus (job and instance).
Metric Description

jvm_classes_loaded

A count of the number of Java classes loaded in the JVM running Magnolia.

jvm_classes_loaded_total

The total number of Java classes loaded in the JVM since it was started.

jvm_classes_unloaded_total

A count of the number of Java classes unloaded by the JVM.

GarbageCollectionProbe

The GarbageCollectionProbe measures the number of times the JVM collected garbage and cumulative time spent garbage collecting.

Configuration properties

Property Description Required

class

Should be info.magnolia.services.instrumentation.probes.jvm.GarbageCollectionProbe.

Metrics

The jvm_classes_loaded, jvm_classes_loaded_total and jvm_classes_unloaded_total metrics are labelled with the default Prometheus (job and instance).
Metric Description

jvm_gc_collection_seconds_count

The count of number times the garbage collection method was executed by the JVM.

jvm_gc_collection_seconds_sum

The total time in seconds spent collecting garbage by method by the JVM.

Labels

Label Metrics Description

gc

jvm_gc_collection_seconds_count jvm_gc_collection_seconds_sum

The garbage collection method, like PS Scavenge or PS MarkSweep, that was executed.

The garbage collection methods used by the JVM depend on the settings the JVM was started with.

MemoryProbe

The MemoryProbe records the sizes of the various memory areas and pools in the JVM over time. Memory areas covered are heap and non-heap memory.

The naming and usage of the memory pools depends on what JVM and version you are using.

Configuration properties

Property Description Required

class

Should be info.magnolia.services.instrumentation.probes.jvm.MemoryProbe.

Metrics

The jvm_classes_loaded, jvm_classes_loaded_total and jvm_classes_unloaded_total metrics are labelled with the default Prometheus (job and instance).
Metric Description

jvm_memory_bytes_used

The number of bytes currently used by the memory area. The "area" label identifies the memory area ("heap" or "non-heap").

jvm_memory_bytes_committed

The number of bytes currently committed in the memory area. The "area" label identifies the memory area ("heap" or "non-heap").

jvm_memory_bytes_max

The maximum number of bytes used by the memory area. The "area" label identifies the memory area ( "heap" or "non-heap").

jvm_memory_bytes_init

The initial size in bytes of the memory area. The "area" label identifies the memory area ( "heap" or "non-heap").

jvm_memory_pool_bytes_used

The number of bytes currently used by the labeled memory pool. The "pool" label identifies the memory pool.

jvm_memory_pool_bytes_committed

The number of bytes committed by the labeled memory pool. The "pool" label identifies the memory pool.

jvm_memory_pool_bytes_max

The maximum number of bytes used by the labeled memory pool. The "pool" label identifies the memory pool.

jvm_memory_pool_bytes_init

The initial size in bytes of the labeled memory pool. The "pool" label identifies the memory pool.

Labels

Label Metrics Description

area

- jvm_memory_bytes_used - jvm_memory_bytes_committed - jvm_memory_bytes_max - jvm_memory_bytes_init

The memory area, "heap" or "non-heap".

pool

- jvm_memory_pool_bytes_used - jvm_memory_pool_bytes_committed - jvm_memory_pool_bytes_max - jvm_memory_pool_bytes_init

The memory pool.

ThreadsProbe

The ThreadsProbe records the number of threads being used in the JVM over time broken down by type.

Configuration properties

Property Description Required

class

Should be info.magnolia.services.instrumentation.probes.jvm.ThreadsProbe.

Metrics

Only the common labels (job and instance) are available for the threads metrics.
Metric Description

jvm_threads_current

The total number of threads currently in use of all types.

jvm_threads_daemon

The total number of daemon threads currently in use.

jvm_threads_peak

The maximum number of threads in use since the JVM was started.

jvm_threads_started_total

The total number of threads created in the JVM.

jvm_threads_deadlocked

The number of currently deadlocked threads.

jvm_threads_deadlocked_monitor

The number of currently deadlocked threads waiting for an object monitor.

VersionInfoProbe

The VersionInfoProbe records the maker and version of the JVM running Magnolia.

Configuration properties

Property Description Required

class

Should be info.magnolia.services.instrumentation.probes.jvm.VersionInfoProbe.

Metrics

Only the common labels (job and instance) are available for the threads metrics.
Metric Description

jvm_info

The version information about the JVM.

The value of this metric will always be 1. The JVM vendor and version are saved as label values.
See below for the Labels used.

Labels

Label Metrics Description

vendor

jvm_info

A string describing the JVM maker.

The JVM vendor can also be retrieved with the SystemProbe (info.magnolia.services.instrumentation.probes.environment.SystemProbe).

version

jvm_info

A string describing the version of the JVM.

The JVM version can also be retrieved with the SystemProbe (info.magnolia.services.instrumentation.probes.environment.SystemProbe).
Feedback

Incubators

×

Location

This widget lets you know where you are on the docs site.

You are currently perusing through the Instrumentation module docs.

Main doc sections

DX Core Headless PaaS Legacy Cloud Incubator modules