The JMX Receiver will work in conjunction with the OpenTelemetry JMX Metric Gatherer
to report metrics from a target MBean server using a built-in or your custom otel
helper-utilizing
Groovy script.
Status: alpha
This receiver will launch a child JRE process running the JMX Metric Gatherer configured with your specified JMX connection information and target Groovy script. It can report metrics to an existing otlp or prometheus metric receiver in your pipeline. In order to use you will need to download the most recent release of the JMX Metric Gatherer JAR and configure the receiver with its path. It is assumed that the JRE is available on your system.
Note: this receiver is in alpha and functionality and configuration fields are subject to change.
Example configuration:
receivers:
jmx:
jar_path: /opt/opentelemetry-java-contrib-jmx-metrics.jar
service_url: service:jmx:rmi:https:///jndi/rmi:https://<my-jmx-host>:<my-jmx-port>/jmxrmi
groovy_script: /opt/my/groovy.script
interval: 10s
exporter: otlp
otlp_endpoint: mycollectorotlpreceiver:55680
username: my_jmx_username
# determined by the environment variable value
password: $MY_JMX_PASSWORD
The path for the JMX Metric Gatherer uber JAR to run.
The JMX Service URL the Metric Gatherer's JMX client should use.
Corresponds to the otel.jmx.service.url
property.
Required.
The built-in target system metric gatherer script to run.
Corresponds to the otel.jmx.target.system
property.
One of groovy_script
or target_system
is required. Both cannot be specified at the same time.
The path of the Groovy script the Metric Gatherer should run.
Corresponds to the otel.jmx.groovy.script
property.
One of groovy_script
or target_system
is required. Both cannot be specified at the same time.
The interval time for the Groovy script to be run and metrics to be exported by the JMX Metric Gatherer within the persistent JRE process.
Corresponds to the otel.jmx.interval.milliseconds
property.
The username to use for JMX authentication.
Corresponds to the otel.jmx.username
property.
The password to use for JMX authentication.
Corresponds to the otel.jmx.password
property.
The metric exporter to use, which matches a desired existing otlp
or prometheus
receiver type.
Corresponds to the otel.exporter
property.
The otlp exporter endpoint to submit metrics. Must coincide with an existing otlp
receiver endpoint
.
Corresponds to the otel.otlp.endpoint
property.
The otlp exporter request timeout.
Corresponds to the otel.otlp.metric.timeout
property.
The headers to include in otlp metric submission requests.
Corresponds to the otel.otlp.metadata
property.
The JMX Metric Gatherer prometheus server host interface to listen to.
Corresponds to the otel.prometheus.host
property.
The JMX Metric Gatherer prometheus server port to listen to.
Corresponds to the otel.prometheus.port
property.
The keystore path is required if SSL is enabled on the target JVM.
Corresponds to the javax.net.ssl.keyStore
property.
The keystore file password if required by SSL.
Corresponds to the javax.net.ssl.keyStorePassword
property.
The keystore type if required by SSL.
Corresponds to the javax.net.ssl.keyStoreType
property.
The truststore path if the SSL profile is required.
Corresponds to the javax.net.ssl.trustStore
property.
The truststore file password if required by SSL.
Corresponds to the javax.net.ssl.trustStorePassword
property.
Supported JMX remote profiles are TLS in combination with SASL profiles: SASL/PLAIN, SASL/DIGEST-MD5 and SASL/CRAM-MD5.
Should be one of: "SASL/PLAIN"
, "SASL/DIGEST-MD5"
, "SASL/CRAM-MD5"
, "TLS SASL/PLAIN"
, "TLS SASL/DIGEST-MD5"
,
or "TLS SASL/CRAM-MD5"
, though no enforcement is applied.
Corresponds to the otel.jmx.remote.profile
property.
The realm, as required by remote profile SASL/DIGEST-MD5.
Corresponds to the otel.jmx.realm
property.