【发布时间】:2018-07-24 10:45:11
【问题描述】:
我正在使用具有以下依赖项的 Spring Boot 2.0.3.RELEASE:
spring-boot-starter-actuator:2.0.3.RELEASE
micrometer-core:1.0.6
micrometer-registry-prometheus:1.0.6
但是当我调用普罗米修斯时,我得到的只是
{
"timestamp": 1532426317772,
"status": 406,
"error": "Not Acceptable",
"message": "Could not find acceptable representation",
"path": "/actuator/prometheus"
}
*and/or from browser*
There was an unexpected error (type=Not Acceptable, status=406).
Could not find acceptable representation
我还使用 Spring Boot 2 尝试了 1.0.X 范围的 Prometheus 以前的版本,但没有运气。有人可以提出一些见解吗?非常感谢。
【问题讨论】:
-
您在项目中使用的是
@EnableWebFlux还是@EnableWebMvc?尝试使用