如何在prometheus中添加/集成rest api端点。例如,在splunk中,我们监控微服务事务和日志。
让我们来看看下面的spring boot:
/abc/v1/something
/abce/v1/something2一句话:-我们如何将上面的微服务端点添加到prometheus中以进行移动
发布于 2019-01-24 20:05:33
在使用Spring Boot2时,您可以轻松地为Prometheus公开您的应用程序指标。参见here。您需要将spring-boot-starter-actuator和Prometheus对micrometer-registry-prometheus的支持添加到依赖项中。
这将以Prometheus exposition格式公开/actuator/prometheus下的指标,以供您的Prometheus实例抓取。
假设您正在使用Spring,那么您将获得WebMvc端点的开箱即用指标。(Jersey支持还提供了额外的模块/依赖项。)
https://stackoverflow.com/questions/54331296
复制相似问题