turbine

turbine起到监控数据聚合的作用
可以把多台服务器监控数据聚合起来,一起提供给hystrix仪表盘展现

搭建turbine步骤

1.添加依赖
turbine/eureka client
2.配置yml
application.yml添加:

spring:
  application:
    name: turbin
    
server:
  port: 5001
  
eureka:
  client:
    service-url:
      defaultZone: http://eureka1:2001/eureka, http://eureka2:2002/eureka
      
turbine:
  app-config: order-service
  cluster-name-expression: new String("default")

2.启动类
启动类添加注解@EnableTurbine

@EnableTurbine
@SpringBootApplication
public class Sp10TurbineApplication {

    public static void main(String[] args) {
        SpringApplication.run(Sp10TurbineApplication.class, args);
    }
}

迈克丝
82 声望5 粉丝

一步一步学技术,踏踏实实涨经验,兴趣广泛,广交好友,希望大家多多指正/批评.