Quick Start
Use the Java agent when you can run the exporter inside the target JVM.
Download the Java agent
Download jmx_prometheus_javaagent-1.2.0.jar from the 1.2.0 release.
Create exporter.yaml
rules:
- pattern: ".*"
Start the application
java -javaagent:jmx_prometheus_javaagent-1.2.0.jar=9404:exporter.yaml -jar your-application.jar
The Java agent starts an HTTP server on port 9404. Metrics are available at http://localhost:9404/metrics.
Next steps
- Java Agent explains Java agent argument formats.
- Rules explains metric rule configuration.
- Examples links to source-backed example configurations.