提问者:小点点

prometheus consul sd"错误刷新服务"


我在普罗米修斯UI得到了预期的结果

level=error ts=2020-05-07T04:58:40.627Z caller=conc.go:487组件="发现管理器抓取"发现=consul msg="错误刷新服务"服务=TL-GRAPHQL-SERVICE tags=err="意外响应代码:503({"时间戳":"2020-05-07T04:58:40.625 0000","状态":503,"错误":"服务不可用","消息":"无可用消息","路径":"/v1/Health/service/TL-GRAPHQL-SERVICE"})"

这是我的服务器的响应。你能帮忙吗?

http://XX.XXX.XXX.XXX:8761/v1/health/service/TL-GRAPHQL-SERVICE
[
{
"Node": {
"Node": "TL-GRAPHQL-SERVICE",
"Address": "XX.XXX.XXX.191",
"Meta": {}
},
"Service": {
"ID": "XX.XXX.XXX:tl-graphql-service:0",
"Service": "TL-GRAPHQL-SERVICE",
"Tags": [],
"Address": "XX.XXX.XXX.191",
"Meta": {},
"Port": 36126
},
"Checks": [
{
"Node": "TL-GRAPHQL-SERVICE",
"CheckID": "service:XX.XXX.XXX:tl-graphql-service:0",
"Name": "Service 'XX.XXX.XXX:tl-graphql-service:0' check",
"Status": "UP"
}
]
},
{
"Node": {
"Node": "TL-GRAPHQL-SERVICE",
"Address": "XX.XXX.XXX.192",
"Meta": {}
},
"Service": {
"ID": "XX.XXX.XXX:tl-graphql-service:0",
"Service": "TL-GRAPHQL-SERVICE",
"Tags": [],
"Address": "XX.XXX.XXX.192",
"Meta": {},
"Port": 45759
},
"Checks": [
{
"Node": "TL-GRAPHQL-SERVICE",
"CheckID": "service:XX.XXX.XXX:tl-graphql-service:0",
"Name": "Service 'XX.XXX.XXX:tl-graphql-service:0' check",
"Status": "UP"
}
]
}
]

我的普罗米修斯配置:

scrape_configs:
  - job_name: 'eureka'
    metrics_path: '/actuator/prometheus'
    scrape_interval: 20s
    consul_sd_configs:
      - server: 'localhost:8761'

共1个答案

匿名用户

是我服务的超时问题。增加异步超时后它的工作。这里解释,

https://github.com/twinformatics/eureka-consul-adapter