下载验证:
application.properties文件,将server.tomcat.mbeanregistry.enabled=true添加进去。http://localhost:8080/actuator 即可获取到所有的参数以及指标;在categraf中的prometheus插件中加入采集配置
cat /opt/categraf/conf/input.prometheus/prometheus.toml
[[instances]]
urls = [
"http://192.168.11.177:8080/actuator/prometheus"
]
url_label_key = "instance"
url_label_value = "{{.Host}}"
2.0 效果图: