I have a Spring Cloud Consul service that has two applications registered as appservice1
and appservice2
. Both applications are exposing a hystrix stream through: http://ip1:8080/appservice1/hystrix.stream
and http://ip2:8080/appservice2/hystrix.stream
so I can check metrics in another application with the Hystrix Dashboard.
I have created an application with Turbine to aggregate my both applications streams with the same cluster (CLUSTER_NAME) into the hystrix dashboard.
Note: I dont even need to have a cluster for now, I just want both applications in the Hystrix Dashboard
This is my application.yml
:
turbine:
aggregator:
clusterConfig: CLUSTER_NAME
appConfig: appservice1,appservice2
instanceUrlSuffix.CLUSTER_NAME: /hystrix.stream
The problem here is since my both applications have a specific server.contextPath
, turbine is not being able to locate the applications /hystrix.stream
because is not building the url with each application context path.
The only way I got this working was with this application.yml
:
turbine:
aggregator:
clusterConfig: appservice1,appservice2
appConfig: appservice1,appservice2
instanceUrlSuffix.appservice1: /appservice1/hystrix.stream
instanceUrlSuffix.appservice2: /appservice2/hystrix.stream
But, this way I would have two clusters, one for each application, and that means I would have to insert each /turbine.stream?cluster=appserviceX
separately into the dashboard.