简体   繁体   中英

Turbine Dashboard Metrics without Eureka

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.

  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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM