Instance metadata's management.context-path doesn't get detected by spring boot admin's DiscoveryListener
See original GitHub issueSo, as per http://codecentric.github.io/spring-boot-admin/1.3.3/#spring-cloud-discovery-support
Since my management context path is different than root since the client app is a war, we have a diff context path , so I tried to set in the meta data map in my client.
## Eureka client properties ##
eureka.instance.metadataMap.instanceId=${spring.application.name}:${spring.application.instance_id}
eureka.instance.metadataMap.management.context-path=/sample
eureka.instance.nonSecurePort=8101
eureka.client.serviceUrl.defaultZone=http://localhost:8761/eureka/
eureka.client.registerWithEureka: true
eureka.client.fetchRegistry: true
My Server config
@SpringBootApplication
@EnableEurekaServer
@EnableAdminServer
@EnableDiscoveryClient
public class PlatformApplication {}
Server props
eureka:
instance:
hostname: localhost
client:
registerWithEureka: true
fetchRegistry: true
serviceUrl:
defaultZone: http://${eureka.instance.hostname}:${server.port}/eureka/
server:
enableSelfPreservation: false
spring.boot.admin.context-path: /admin
spring.boot.admin.hazelcast.enabled: false
Spring Cloud Version on the server component : Brixton.SR6 Admin Server Version : 1.3.7
It still doesnt return the managementUrl appended to the management context path from the instance metadata of the client. I checked the api response of admin. Am I missing something ? And I think thats why it is showing OFFLINE in the admin UI.
Issue Analytics
- State:
- Created 7 years ago
- Comments:6
Top Results From Across the Web
codecentric/spring-boot-admin - Gitter
I found the solution and share it with every body. into application.properties. management.port=9086 management.context-path=/manage eureka.instance.
Read more >Spring Boot Admin Client showing only details when there is ...
At my case I only point eureka.instance.metadata-map.management.context-path at ${service.servlet.context-path}/actuator
Read more >Spring Boot Admin Reference Guide - GitHub Pages
codecentric's Spring Boot Admin is a community project to manage and monitor your Spring Boot ® applications. The applications register with our ...
Read more >Index (GigaSpaces 15.8.0 API)
Encapsulates information about an index segment of a compound index. AbstractCompoundIndexSegment() - Constructor for class com.gigaspaces.metadata.index.
Read more >Simple Spring Boot Admin Setup - Bozho's tech blog
context-path =/manage in your application properties file. Now that the actuator endpoints are setup, we have to attach our spring admin ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
When using Eureka the SBA server can only use the information published by the Eureka registry: the healthCheckUrlPath and the service url (doesn’t contain the servlet.context-path!) - so these need to be correct (and you need to set the healthCheckUrlPath explicitly when using non default context-path, see http://cloud.spring.io/spring-cloud-netflix/spring-cloud-netflix.html#_status_page_and_health_indicator).
In this case SBA server can’t guess anything based on the server.context-path or management.context-path, since it simply doesn’t know about the values for the registered application. This would only apply if you are using the SBA client - then the client computes the correct urls and uses them to register at the server…)
@joshiste : Makes sense ! Thank you !