JVM (JMX Exporter)¶
Notice
The current article mainly collects JVM related metric information through the JMX Exporter method.
Configuration¶
Description: Enable the jvm collector
to collect jvm
metric information through the jvm collector
.
Application access to JMX Exporter¶
The following are all examples of jar
running mode.
- Download
Choose the download version according to actual needs https://github.com/prometheus/jmx_exporter/releases,Select version 0.18.0
here.
- Boot Configuration
javaagent
DataKit opens the prom
collector¶
The directory where the collector is located is datakit/conf.d/prom
. After entering the directory, copy prom.conf.sample
and rename the new file to jvm_prom.conf
, mainly configuring urls
, sources
, and measurements_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 jvm_
The metric set at the beginning.
- Restart DataKit