the server property of consul_sd_configs was escaped and can't access

50 views
Skip to first unread message

xiaozhou z

unread,
May 16, 2023, 4:41:46 AM5/16/23
to Prometheus Users
consul behind a reverse proxy. if i set the server like this
- server: 'host.docker.internal/consul'
log below
level=error ts=2019-12-04T07:34:11.344Z caller=consul.go:269 component="discovery manager scrape" discovery=consul msg="Error retrieving datacenter name" err="Get http://host.docker.internal%2Fconsul/v1/agent/self: dial tcp: lookup host.docker.internal/spring-boot-admin-server: no such host"
the slash in path was escaped to %2F .
curl http://host.docker.internal/consul/v1/agent/self could show the result

Reply all
Reply to author
Forward
0 new messages