-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Description
Please use the following questions as a guideline to help me answer
your issue/question without further inquiry. Thank you.
Which version of Elastic are you using?
[x] elastic.v7 (for Elasticsearch 7.x)
[ ] elastic.v6 (for Elasticsearch 6.x)
[ ] elastic.v5 (for Elasticsearch 5.x)
[ ] elastic.v3 (for Elasticsearch 2.x)
[ ] elastic.v2 (for Elasticsearch 1.x)
Please describe the expected behavior
sniff support ipv6 config
Please describe the actual behavior
codes below from "github.com/olivere/elastic/v7/client.go" used by sniffNode does not support ipv6 address(elastic.v6 support)
// extractHostname returns the URL from the http.publish_address setting.
func (c *Client) extractHostname(scheme, address string) string {
var (
host string
port string
addrs = strings.Split(address, "/")
ports = strings.Split(address, ":")
)
if len(addrs) > 1 {
host = addrs[0]
} else {
host = strings.Split(addrs[0], ":")[0]
}
port = ports[len(ports)-1]
return fmt.Sprintf("%s://%s:%s", scheme, host, port)
}