3

I am working on two Spring-boot applications. I am using spring-cloud-starter-hystrix for circuit-breaking & fallback methods using @EnableCircuitBreaker.

Now I also want to have an hystrix dashboard with metrics which can be achieved by Turbine Server using @EnableTurbine @EnableHystrixDashboard.

AFAIK the Turbine service gets the application URLs from Eureka Instance. And in Turbine server app.properties we should give the other apps name. So that Turbine will check with Eureka on app url:port.

In my case, I am not using Eureka. So how can I use a Turbine Service to manually hardcode my application URL to fetch metric streams & display the metrics dashboard?

So basically in Turbine Server can I disable connection to Eureka & hardcode URLs to fetch metrics?

I have browsed for few hours & couldnt find a solution. Any help is appreciated.

John Seen
  • 701
  • 4
  • 15
  • 31
  • This may not suit your needs, but: you can configure your services and the turbine server to read/write to a kafka topic, instead of using http to communicate. I believe the topic name is springCloudHystrixStream. This removes the need for a discovery service like eureka, since all of the participating components are aware of the topic name. This post has relevant information. – StvnBrkdll Oct 20 '18 at 13:12

1 Answers1

1
  1. Download and run turbine-web war file from HERE and deploy it on any server say a tomcat with a JVM runtime argument specifying the location of your turbine config file. Something like-

-Darchaius.configurationSource.additionalUrls=file:///etc/files/turbine-archaius.properties"

  1. Add configuration like your server IPs, URI of hystrix stream servlet in that file. Take more help from HERE.

Here's my sample config file for better understanding-

turbine.aggregator.clusterConfig=<cluster-name>

turbine.instanceUrlSuffix.<cluster-name>=/hystrix.stream

#I am using a separate file to list down all my server IPs that turbine need to agregate data from turbine.FileBasedInstanceDiscovery.filePath=/etc/files/turbine-server-list

InstanceDiscovery.impl=com.netflix.turbine.discovery.FileBasedInstanceDiscovery

turbine.InstanceMonitor.eventStream.skipLineLogic.enabled=false

The other file turbine-server-list contains server IPs from which to aggregate metrics. something like-

APPLICATION-IP1:PORT,<cluster-name>,up

APPLICATION-IP2:PORT,<cluster-name>,up

  1. Find your aggregated turbine metrics at- http://TURBINE-SERVER-IP:PORT/turbine/turbine.stream?cluster=cluster-name
Mukul Bansal
  • 878
  • 8
  • 10
  • Hey, I was not able to get this to work. Turbine always uses Eureka, it ignores the InstanceDiscovery.impl. this is when I am building my own spring-boot app – devo May 14 '19 at 19:42
  • 1
    @devo Spring boot does things a bit differently. I haven't exactly integrated this with spring boot. This works well with spring MVC projects. Are you using spring-cloud-starter-turbine maven dependency? – Mukul Bansal May 16 '19 at 10:39
  • Hey, thanks for getting back. You are right, the spring-boot way is very different than the way you document above. I was able to figure it out. Asked and answered here: https://stackoverflow.com/questions/56136876/problems-with-hystrix-dashboard-turbine-using-filebasedinstancediscovery – devo May 17 '19 at 17:51