Netflix / Prana

A sidecar for your NetflixOSS based services.
Apache License 2.0
502 stars 98 forks source link

no option to get ip addresses instead of hostname #26

Open exhesham opened 7 years ago

exhesham commented 7 years ago

when i send a curl request to receive the service hosts, i get only hostnames. curl -X GET http://127.0.0.1:8078/eureka/hosts?appName=s2 when i set the configuration

eureka.instance.preferIpAddress=true

I still get hostnames instead of IP addresses.

In order to get the hostname, i had to change the file HostsHandler.java as follows: hosts.add(instanceInfo.getIPAddr());

There should be an option to make it configurable

dawangdw commented 7 years ago

This may be a bug I would say, this project is no longer maintained I think, I saw this. Currently I am using spring sidecar(http://cloud.spring.io/spring-cloud-static/spring-cloud.html#_polyglot_support_with_sidecar). Hope it can help you. :)