Search code examples
spring-cloudhystrixturbinenetflix-eureka

Turbine doesn't know contextPath of each application through Eureka


When deploying Spring Cloud-enabled microservices on JBoss, we have to use a contextPath. Turbine doesn't seem to fetch the contextPath from eureka and eureka doesn't seem to ask it to the microservices.

Some more details:

Every microservice has its own Jboss, and its own contextPath defined in the war, as such:

hostname1:port1/products
hostname2:port2/users
hostname3:port3/orders

Endpoints (actuator and our own) are exposed after the contextPath (not using management.context-path):

hostname1:port1/products/env
hostname1:port1/products/info
hostname1:port1/products/books
hostname1:port1/products/books/123

Eureka only cares about the hostname and port. It allows us to define a different UrlPath to info and health although this is not part of the data Turbine needs to get to hystrix.stream:

eureka:
  instance:
    statusPageUrlPath: ${server.contextPath}/info
    healthCheckUrlPath: ${server.contextPath}/health

Is there a way to tell Turbine which contextPath is used for which application? These are different per application so a cluster-wide fix described here wouldn't be sufficient I suppose.


Solution

  • You can only view one cluster at a time in normal turbine. With spring-cloud-netflix-hystrix-amqp we aggregate all statistics via rabbitmq (not http), so you can see everything at once.