Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upconsul service discvery: I expect use host address instead of ServiceAddress #2342
Comments
This comment has been minimized.
This comment has been minimized.
|
You can use relabelling to pull in the other address. |
brian-brazil
added
the
kind/question
label
Jan 14, 2017
This comment has been minimized.
This comment has been minimized.
|
@brian-brazil thanks!! This issue solved with relabel config below.
|
yteraoka
closed this
Jan 14, 2017
This comment has been minimized.
This comment has been minimized.
lock
bot
commented
Mar 24, 2019
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
lock
bot
locked and limited conversation to collaborators
Mar 24, 2019
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
yteraoka commentedJan 14, 2017
What did you do?
I tried consul service discovery.
What did you expect to see?
Prometheus server that in outside of docker cuslter access exposed port on docker host IP address.
What did you see instead? Under which circumstances?
Consul service discovery use ServiceAddress that in docker internal network.
So, Prometheus server can't reach metrics endpoint.
Current implementation of consul service discovery use ServiceAddress prior to address.
https://github.com/prometheus/prometheus/blob/master/discovery/consul/consul.go#L278
Consul return to prometheus bellow response.
Prometheus server is running outside of docker cluster.
Server cant't reach ServiceAddress that in docker internal network.
So, I expect using host address instead of ServiceAddress.
Is there a way to solve this issue?
Environment
Docker 1.11 + swarm with consul.
Registrator store container information into consul.
strace output