System probes
System probes collect information about the environment and system properties of the JVM running Magnolia. They can be used to discover the environment and system properties used by Magnolia and their settings.
System probes are configured in the instrumentation module.
There are four system probes:
Available System probes
-
EnvironmentProbe (Note: deprecated in v1.3)
Both SystemProbe and SystemPropertiesProbe capture the same information - the JVM system properties - but in slightly different forms as measurement labels. |
Both EnvironmentProbe and EnvironmentPropertiesProbe collect the same information - the environment properties visible through System.getenv() - but as differently labelled metrics.
|
RuntimeProbeCommand captures information about the JVM running Magnolia: its name, vendor and version. Unlike the other system probes, RuntimeProbeCommand is actually a Magnolia command that collects its metrics when executed.
All system 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). System probes defined in the instrumentation module are created or modified when the instrumentation module is restarted or changed.
There are common properties for system probes, including:
-
class
- the full class name of the instrumentation probe to instantiate, for example,info.magnolia.services.instrumentation.probes.environment
.SystemPropertiesProbe
. -
enabled
- a flag, either true or false, true indicating the probe is active and collecting metrics and false if not.
Property | Default | Description | ||
---|---|---|---|---|
|
The fully qualified class name of the probe to instantiate.
|
|||
|
|
Flag controlling if the probe is active and can provide measurements ( |
SystemProbe
The SystemProbe records the system properties and their values in the JVM.
System properties are retrieved by calling:
System.getProperties()
See https://docs.oracle.com/javase/8/docs/api/java/lang/System.html for more details. |
Each system property will be added as a label to the metric with its value. You can restrict the system properties collected by defining the properties parameter; only system properties matching a name in properties will be collected.
Configuration properties
Property | Description | Required | ||||
---|---|---|---|---|---|---|
|
Should be |
|||||
|
The metric name used by Prometheus. Taken as from the node name when configured. |
|||||
|
A description of the metric. |
|||||
|
An array of properties names.
|
|||||
|
An array of property names to exclude from collection.
|
Metrics
Metric | Description | ||
---|---|---|---|
|
The configured metric name with each system property and its value as labels.
|
SystemPropertiesProbe
The SystemPropertiesProbe records the system properties and their values in the JVM like SystemProbe. Unlike SystemProbe, SystemPropertiesProbe records each system property as a separate measurement with set labels (propertyName and propertyValue).
The system properties recorded by SystemPropertiesProbe may be more convenient to work with since they have set labels (propertyName and propertyValue) than SystemProbe’s labels of <system property>=<value>.
System properties are retrieved by calling:
System.getProperties()
https://docs.oracle.com/javase/8/docs/api/java/lang/System.html for more details. |
The name of each system property will be added as the value of the propertyName label. The value of each system property will be added as the value of the propertyValue label.
Configuration properties
Property | Description | Required | ||||
---|---|---|---|---|---|---|
|
Should be |
|||||
|
The metric name used by Prometheus. Taken as from the node name when configured. |
|||||
|
A description of the metric. |
|||||
|
An array of properties names.
|
|||||
|
An array of property names to exclude from collection.
|
Metrics
Metric | Description | ||
---|---|---|---|
|
The configured metric name with each system property and its value as labels.
|
EnvironmentProbe
EnvironmentProbe was deprecated in v1.3. Use SystemProbe instead. |
EnvironmentPropertiesProbe
The EnvironmentPropertiesProbe records the environment properties and their values in the JVM like EnvironmentProbe. Unlike EnvironmentProbe, EnvironmentPropertiesProbe records each environment property as a separate measurement with set labels (propertyName
and propertyValue
).
The system properties recorded by EnvironmentPropertiesProbe may be more convenient to work with since they have set labels (propertyName
and propertyValue
) than EnvironmentProbe’s labels of <system property>=<value>
.
System properties are retrieved by calling:
System.getenv()
https://docs.oracle.com/javase/8/docs/api/java/lang/System.html for more details. |
The name of each environment property will be added as the value of the propertyName label. The value of each environment property will be added as the value of the propertyValue label.
Configuration properties
Property | Description | Required | ||||
---|---|---|---|---|---|---|
|
Should be |
|||||
|
The metric name used by Prometheus. Taken as from the node name when configured. |
|||||
|
A description of the metric. |
|||||
|
An array of properties names.
|
|||||
|
An array of property names to exclude from collection.
|
Metrics
Metric | Description | ||
---|---|---|---|
|
The configured metric name with environment properties name as the
|