mirror of
https://github.com/prometheus/prometheus.git
synced 2025-03-05 20:59:13 -08:00
Merge pull request #919 from prometheus/revert-consul-service-address
Revert "Use Consul ServiceAddress instead of Address when set"
This commit is contained in:
commit
31fdb85d2c
|
@ -259,10 +259,6 @@ func (cd *ConsulDiscovery) watchService(srv *consulService, ch chan<- *config.Ta
|
||||||
|
|
||||||
for _, node := range nodes {
|
for _, node := range nodes {
|
||||||
addr := fmt.Sprintf("%s:%d", node.Address, node.ServicePort)
|
addr := fmt.Sprintf("%s:%d", node.Address, node.ServicePort)
|
||||||
// Use ServiceAddress instead of Address if not empty.
|
|
||||||
if len(node.ServiceAddress) > 0 {
|
|
||||||
addr = fmt.Sprintf("%s:%d", node.ServiceAddress, node.ServicePort)
|
|
||||||
}
|
|
||||||
// We surround the separated list with the separator as well. This way regular expressions
|
// We surround the separated list with the separator as well. This way regular expressions
|
||||||
// in relabeling rules don't have to consider tag positions.
|
// in relabeling rules don't have to consider tag positions.
|
||||||
tags := cd.tagSeparator + strings.Join(node.ServiceTags, cd.tagSeparator) + cd.tagSeparator
|
tags := cd.tagSeparator + strings.Join(node.ServiceTags, cd.tagSeparator) + cd.tagSeparator
|
||||||
|
|
Loading…
Reference in a new issue