普罗米修斯端点未暴露

时间:2021-04-07 14:18:02

标签: spring-boot prometheus spring-boot-actuator

我通过以下方式在 Spring Boot 应用程序中添加了 prometheus 依赖项。

我在gradle中添加了以下依赖

runtimeOnly ('io.micrometer:micrometer-registry-prometheus')
runtimeOnly ('io.micrometer:micrometer-core')

应用程序.yml

management:
  endpoints.web.exposure.include: '*'
  endpoint.metrics.enabled: true
  endpoint.prometheus.enabled: true
  metrics.export.prometheus.enabled: true
server.servlet.context-path: /route

部署文件中的注释 部署.yml

 annotations:
    prometheus.io/scrape: "true"
    prometheus.io/probe: "true"
    prometheus.io/port: "8010"
    prometheus.io/path: "/actuator/prometheus"

部署后 /actuator/prometheus 端点未公开,但在 localhost 中已公开 我应该改变什么才能使它工作

0 个答案:

没有答案