下载jmx_exporter
1 | mkdir -p /app/runtime/prometheus/jmx_exporter |
添加配置文件 simple-config.yml
1 |
|
启动jar包
1 | #!/bin/bash -ile |
修改prometheus配置文件
1 | - job_name: 'jvm' |
重启prometheus
1 | nohup ./prometheus --config.file=./prometheus.yml & |
grafana配置
配置prometheus数据源
添加prometheus插件,然后配置