New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

properties not used spring.boot.admin.client.service-url #502

Closed
ulysses-you opened this Issue Jul 20, 2017 · 7 comments

Comments

Projects
None yet
3 participants
@ulysses-you
Copy link

ulysses-you commented Jul 20, 2017

spring boot version : 1.5.1
spring boot admin : 1.5.2
I use SBA with eureka, not SBA client.
The SBA server set properties
management.context-path=/monitor
When I set properties
spring.boot.admin.client.service-url=http://hostname:8080/registry , spring.boot.admin.client.management-url
spring.boot.admin.client.health-url,
at one service which registry to the eureka. The SBA server resolve the
serviceUrl=http://hostname:8080.
So the SBA UI can't get the service's info or heath.
I have seen the Admin Starter Client ignoring Service, and try
spring.boot.admin.client.ignoreUnknownFields=true,
It still wrong.
How can I set the properties?

@joshiste

This comment has been minimized.

Copy link
Member

joshiste commented Jul 20, 2017

The spring.boot.admin.client.* properties aren't taken into account when you are using eureka. You need to set the management.context-path / management.porton your eureka instance metadata (see http://cloud.spring.io/spring-cloud-static/spring-cloud-netflix/1.3.1.RELEASE/#_eureka_metadata_for_instances_and_clients and http://codecentric.github.io/spring-boot-admin/1.5.2/#spring-cloud-discovery-support)

@joshiste joshiste closed this Jul 20, 2017

@ulysses-you

This comment has been minimized.

Copy link

ulysses-you commented Jul 21, 2017

I have done that with setting properties
eureka.instance.statusPageUrlPath=/registry/info, eureka.instance.healthCheckUrlPath=/registry/health, eureka.instance.homePageUrlPath=/registry
But the SBA server log show
managementUrl=http://hostname:8080, healthUrl=http://hostname:8080/registry/health, serviceUrl=http://hostname:8080],
there is only healthUrl changed, so the SBA UI only shows health.
I find source the eureka InstanceInfo and the SBA server Application. it has different key between class, such as homePageUrl and serviceUrl.
Is this bug? or how can i set properties.

@joshiste

This comment has been minimized.

Copy link
Member

joshiste commented Jul 21, 2017

As I said you need to set eureka.instance.metadata-map.management.context-path and eureka.instance.metadata-map.management.context-port

@ulysses-you

This comment has been minimized.

Copy link

ulysses-you commented Jul 21, 2017

Thank you for your help.
I considermanagement.context-path firstly, so got the wrong result.
By the way, you can add it to document.

@joshiste

This comment has been minimized.

Copy link
Member

joshiste commented Jul 21, 2017

The metadata options are in the guide. There is no section on how to add metadata to eureka - since there are many spring cloud discovery client implementations. That's why I've posted two links which just need to be read carefully.

@ulysses-you

This comment has been minimized.

Copy link

ulysses-you commented Jul 21, 2017

oh! I see this properties now.
Read carefully is very very very important.

@bob-rohan

This comment has been minimized.

Copy link

bob-rohan commented Jan 19, 2018

Thanks for pointing out the metadata options. Small amendment, I believe eureka.instance.metadata-map.management.context-port should be eureka.instance.metadata-map.management.port. At least that's what works for me.

As I said you need to set eureka.instance.metadata-map.management.context-path and eureka.instance.metadata-map.management.context-port

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment