相关疑难解决方法(0)

Prometheus端点不起作用Spring Boot 2.0.0.RC1启用了Spring Webflux

我按照此处的文档(https://docs.spring.io/spring-boot/docs/2.0.0.RC1/reference/htmlsingle/#production-ready-endpoints-enabling-endpoints)进行操作,并确保application.yml文件具有以下

management:
  metrics:
    export:
      prometheus:
        enabled: true
  endpoints:
    web:
      expose:
        health, info, httptrace, metrics, threaddump, mappings, prometheus
Run Code Online (Sandbox Code Playgroud)

根据文档(https://docs.spring.io/spring-boot/docs/current-SNAPSHOT/actuator-api/html/#prometheus),以下操作无效。

curl 'http://localhost:8080/actuator/prometheus' -i
Run Code Online (Sandbox Code Playgroud)

我得到404处理程序映射未找到异常。有人可以让我知道如何启用Prometheus端点进行抓取,以及需要使用哪个URL端点进行测试吗?

o.s.w.r.r.m.a.RequestMappingHandlerMapping[276] - Did not find handler method for [/actuator/prometheus]
Run Code Online (Sandbox Code Playgroud)

所有其他端点的运行状况,信息,httptrace,线程转储,映射均正常运行。

spring spring-boot spring-boot-actuator spring-webflux

6
推荐指数
2
解决办法
5808
查看次数