Spring Boot 2.7.18, java.version 11: `/Actuator/Prometheus 'Возвращает страницу ошибки WhiteLabelJAVA

Программисты JAVA общаются здесь
Ответить Пред. темаСлед. тема
Anonymous
 Spring Boot 2.7.18, java.version 11: `/Actuator/Prometheus 'Возвращает страницу ошибки WhiteLabel

Сообщение Anonymous »

Описание
Я разрабатываю приложение spring 2.7.18 с java 11 и хочу использовать prometheus для сбора метрик. Однако, когда я получаю доступ к http: // localhost: 8080/actuator/prometheus , я получаю страницу ошибки whitelabel , тогда как http: // localhost: 8080/actuator/ возвращает JSON как ожидалось. Текущая конфигурация

application.yml

management:
endpoint:
metrics:
enabled: true
prometheus:
enabled: true
endpoints:
web:
exposure:
include: "*"
metrics:
export:
prometheus:
enabled: true
< /code>

pom.xml Соответствующие зависимости


UTF-8
11
2.7.18


io.micrometer
micrometer-registry-prometheus
1.14.3



org.springframework.boot
spring-boot-starter-actuator
${spring-boot.version}

< /code>

2. Текущее поведение

http: // localhost: 8080/actuator/ возвращает:

{
"_links": {
"self": {
"href": "http://localhost:8080/actuator",
"templated": false
},
"beans": {
"href": "http://localhost:8080/actuator/beans",
"templated": false
},
"caches": {
"href": "http://localhost:8080/actuator/caches",
"templated": false
},
"caches-cache": {
"href": "http://localhost:8080/actuator/caches/{cache}",
"templated": true
},
"health-path": {
"href": "http://localhost:8080/actuator/health/{*path}",
"templated": true
},
"health": {
"href": "http://localhost:8080/actuator/health",
"templated": false
},
"info": {
"href": "http://localhost:8080/actuator/info",
"templated": false
},
"conditions": {
"href": "http://localhost:8080/actuator/conditions",
"templated": false
},
"configprops-prefix": {
"href": "http://localhost:8080/actuator/configprops/{prefix}",
"templated": true
},
"configprops": {
"href": "http://localhost:8080/actuator/configprops",
"templated": false
},
"env-toMatch": {
"href": "http://localhost:8080/actuator/env/{toMatch}",
"templated": true
},
"env": {
"href": "http://localhost:8080/actuator/env",
"templated": false
},
"loggers-name": {
"href": "http://localhost:8080/actuator/loggers/{name}",
"templated": true
},
"loggers": {
"href": "http://localhost:8080/actuator/loggers",
"templated": false
},
"heapdump": {
"href": "http://localhost:8080/actuator/heapdump",
"templated": false
},
"threaddump": {
"href": "http://localhost:8080/actuator/threaddump",
"templated": false
},
"metrics": {
"href": "http://localhost:8080/actuator/metrics",
"templated": false
},
"metrics-requiredMetricName": {
"href": "http://localhost:8080/actuator/metrics/ ... MetricName}",
"templated": true
},
"scheduledtasks": {
"href": "http://localhost:8080/actuator/scheduledtasks",
"templated": false
},
"mappings": {
"href": "http://localhost:8080/actuator/mappings",
"templated": false
},
"refresh": {
"href": "http://localhost:8080/actuator/refresh",
"templated": false
},
"features": {
"href": "http://localhost:8080/actuator/features",
"templated": false
},
"traces": {
"href": "http://localhost:8080/actuator/traces",
"templated": false
}
}
}

Это означает, что прометэй конечная точка не указана , но доступна метрика Page
Сообщение об ошибке:
Whitelabel Error Page
This application has no explicit mapping for /error, so you are seeing this as a fallback.
< /code>
Это говорит о том, что конечная точка Prometheus < /code> не включена должным образом, или привод не вызывает ее. < /p>

3. Что я попробовал

[*] обеспечение проверки rometheus management.endpoints.web.exposure.include: "*" должен выявить все конечные точки.
Однако http: // localhost: 8080/actuator/ не показывает prometheus , указывая на то, что он не зарегистрирован. Правильно < /strong> < /p>

Запуск MVN -зависимость: дерево | Grep Micrometer < /code> подтверждает, что присутствует микрометра-регистрация-prometheus < /code>. < /li>
< /ul>
< /li>
< /ol>

4. Вопрос


Почему http: // localhost: 8080/actuator/prometheus страница ошибок WhiteLabel ? /> Каковы могут быть возможные причины для этой проблемы? < /li>
< /ul>
Любая помощь будет очень оценена!

Подробнее здесь: https://stackoverflow.com/questions/795 ... itelabel-e
Реклама
Ответить Пред. темаСлед. тема

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

  • Похожие темы
    Ответы
    Просмотры
    Последнее сообщение

Вернуться в «JAVA»