gpt4 book ai didi

java - JMX_exporter 与 Prometheus 和 Grafana

转载 作者:行者123 更新时间:2023-12-02 11:33:14 25 4
gpt4 key购买 nike

我有 SpringBoot 应用程序,我想对其实现 jmx 监控。我已经成功地使用prometheus计数器实现了对服务的监控,并使用node_exporter对机器进行了监控。之后我将它与grafana连接起来。没事儿。

现在我想通过 Jmx 导出器获取指标,但我发现这很困难。我无法了解如何从 JMX 导出器获取指标。网上没有太多关于这个的东西......

我需要什么来获取指标?启动JMX_exporter,更改prometheus config.yml?

最佳答案

当您有 SpringBoot 应用程序时,您可以使用 Spring Boot 执行器来获取指标。只需放入Spring Boot Actuator的依赖即可。

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-actuator</artifactId>
</dependency>

关于java - JMX_exporter 与 Prometheus 和 Grafana,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49132055/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com