Я пытаюсь настроить мониторинг Prometheus в загрузочном приложении Spring, но получаю сообщение об ошибке: Get https://example.com:8080/actuator/prometheus: EOF
Моя настройка
application.yml
management:
endpoints:
web:
exposure:
include: "*"
endpoint:
metrics:
enabled: true
prometheus:
enabled: true
metrics:
export:
prometheus:
enabled: true
Prometheus config
global:
scrape_interval: 5s # Set the scrape interval to every 5 seconds.
evaluation_interval: 5s # Evaluate rules every 5 seconds.
scrape_configs:
- job_name: 'app'
metrics_path: '/actuator/prometheus'
scheme: https
static_configs:
- targets: ['example.com:8080']
Теперь, просматривая actuator/prometheus
, я вижу данные:
# HELP hikaricp_connections_usage_seconds Connection usage time
# TYPE hikaricp_connections_usage_seconds summary ....
....
Но на экране целей Prometheous я вижу правильный URL, но с указанной ошибкой.
Я запускаю Prometheus с помощью Docker.
level=info ts=2018-08-14T19:10:59.6844594Z caller=main.go:603 msg="Loading configuration file" filename=/etc/prometheus/prometheus.yml
level=info ts=2018-08-14T19:10:59.686749Z caller=main.go:629 msg="Completed loading of configuration file" filename=/etc/prometheus/prometheus.yml
level=info ts=2018-08-14T19:10:59.6867898Z caller=main.go:502 msg="Server is ready to receive web requests."