Skip to main content
1.6.0

Standalone Exporter

The standalone exporter runs as a separate process and connects to a target JVM over remote JMX/RMI. Prefer the Java agent unless you must scrape a remote JVM.

Artifact​

Download jmx_prometheus_standalone-1.6.0.jar from the 1.6.0 release.

Argument formats​

The standalone main method parses command-line arguments:

FormatBehavior
<PORT> <EXPORTER_YAML>Enable HTTP on 0.0.0.0:<PORT>.
<HOST>:<PORT> <EXPORTER_YAML>Enable HTTP on the specified host and port.
<EXPORTER_YAML>Do not start HTTP; useful for OpenTelemetry-only configuration.

Ports must be from 1 through 65535.

HTTP mode example​

java -jar jmx_prometheus_standalone-1.6.0.jar 9404 exporter.yaml
hostPort: application.example.com:9999
rules:
- pattern: ".*"

Equivalent explicit JMX URL:

jmxUrl: service:jmx:rmi:///jndi/rmi://application.example.com:9999/jmxrmi
rules:
- pattern: ".*"

hostPort and jmxUrl are mutually exclusive.

Remote JMX authentication​

Use top-level username and password for remote JMX credentials:

hostPort: application.example.com:9999
username: jmx-user
password: jmx-password
rules:
- pattern: ".*"

Remote JMX SSL​

If the remote JMX connection requires SSL, enable collector SSL:

hostPort: application.example.com:9999
ssl: true
rules:
- pattern: ".*"

A map form is also supported for remote JMX keystore, truststore, protocols, and ciphers. See SSL configuration.

OpenTelemetry-only example​

java -jar jmx_prometheus_standalone-1.6.0.jar exporter.yaml
hostPort: application.example.com:9999
openTelemetry:
endpoint: http://localhost:4317
rules:
- pattern: ".*"

Lifecycle and errors​

Standalone startup occurs through Standalone.main. Malformed arguments, invalid ports, an unreadable config file, invalid YAML, or remote JMX connection errors fail startup or scraping according to the underlying collector behavior.