JMX probes
The JMX probe can collect metrics from JMX beans inside and outside Magnolia. The JMX probes are configured in the instrumentation module.
You can configure multiple JMX probes to collect metrics from different JMX beans. A configured JMX probes can collect several metrics from a single MX bean.
A MX bean can provide many different properties and values. A JMX probe uses one or more JMX attribute metrics to collect metrics (info.magnolia.services.instrumentation.probes.jmx.JMXAttributeMetric
) from a MX bean.
So, to summarize:
-
JMX probe: retrieves a MX bean with a JMX query, passes the MX bean to its JMX attribute metrics to collect metrics
-
JMX attribute metric: defines and collects a metric from a property of the MX bean
JMX attribute metrics can handle two types of values returned by MX bean properties: single values and maps.
Metrics collected by a JMX attribute metric have a double value. If the property of the MX bean is not convertible to a double value, you can set a default value in the JMX attribute collector to be used as the value of the metric.
If the MX bean property returns a map, the mapped JMX attribute metric () can select a value from the map and use it as the value of the metric.The mapped JMX attribute metric specifies a map key retrieve the metric value from the property map.
JMXProbe
The JMXProbe can collect one or more metrics from a JMX bean.
Note that the JMX attribute metrics actually define and collect metrics from the JMX bean, the JMX probe itself just retrieves the JMX bean.
Configuration properties
Property | Description | Required | ||
---|---|---|---|---|
|
|
|||
|
The probe name.
|
|||
|
A description of the probe. |
|||
|
Flag controlling if the probe is active and can provide measurements (true) or is disabled and not providing measurements (false). Default = |
|||
|
A JMX query for a JMX bean. |
|||
|
A list of one or more JMX attribute metrics, either JMX attribute metrics (
|
JMXAttributeMetric
A JMXAttributeMetric defines a metric with value from a JMX bean property. The property value should be a single value.
If the JMX bean property is not convertible to a double value, a default value can be used as the value for the metric. |
Configuration properties
Property | Description | Required | ||
---|---|---|---|---|
|
|
|||
|
The JMX bean property name to be retrieved.
|
|||
|
The name of the metric. |
|||
|
A description of the metric. |
|||
|
A flag indicating if the MX bean property value can be converted to a double and used as the metric value.
Default = |
|||
|
The default value for the metric used when the bean property value is not numeric and convertible is set to false. Default = |
MappedJMXAttributeMetric
A MappedJMXAttributeMetric defines a metric with value from a JMX bean property that returns a map.
If the value retrieved from the map is not convertible to a double value, a default value can be used as the value for the metric.
Configuration properties
Property | Description | Required | ||
---|---|---|---|---|
|
|
|||
|
The JMX bean property name to be retrieved.
|
|||
|
The name of the metric. |
|||
|
A description of the metric. |
|||
|
A flag indicating if the MX bean property value can be converted to a double and used as the metric value.
Default = |
|||
|
The default value for the metric used when the bean property value is not numeric and convertible is set to false. Default = |