JVM (JMX Exporter)¶
Tip
This article mainly focuses on collecting JVM-related metrics information via the JMX Exporter method.
Configuration¶
Description: Enable the jvm collector
, which collects jvm
Metrics information through the jvm collector
.
Application Integration with JMX Exporter¶
The following examples all use the jar
runtime method.
- Download
Download the version based on actual needs from https://github.com/prometheus/jmx_exporter/releases. Here we choose version 0.18.0.
- Start configuration
javaagent
DataKit Enable prom
Collector¶
The collector directory is datakit/conf.d/prom
. After entering the directory, copy prom.conf.sample
and rename the new file to jvm-prom.conf
. Mainly configure url, source, and measurement_prefix; other parameters can be adjusted as needed.
urls =["http://localhost:8080/metrics"]
source = "jmx_jmx_exporter_prom"
measurement_prefix = "jvm_"
[inputs.prom.tags]
server="server"
The above configuration will generate a Measurement set that starts with jvm_
.
- Restart DataKit
Restart DataKit ```