大漠知秋的加油站

  • 首页
大漠知秋的加油站
你就当我的烂笔头吧
  1. 首页
  2. Spring Cloud Finchley.RELEASE
  3. 正文

Hystrix Turbine

2019年1月3日 425点热度 0人点赞 0条评论

  Hystrix Dashboard 在集群环境下的作用基本上可以忽略,所以需要一种方式来聚合整个集群下的监控状况,Turbine就是用来聚合所有相关的 hystrix.stream 流的解决方案,最后在 Hystrix Dashboard 中显示出来。

  1. 新增依赖
<!-- Spring Cloud Hystrix Turbine -->
<dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-starter-netflix-turbine</artifactId>
</dependency>
  1. 启动类上开启 Turbine
/**
 * @Author:大漠知秋
 * @Description:Hystrix Dashboard 服务启动入口
 * @CreateDate:11:27 AM 2018/10/29
 */
@SpringBootApplication
/** 开启服务发现 */
@EnableDiscoveryClient
/** 开启 Hystrix Dashboard 监控功能 */
@EnableHystrixDashboard
/** 开启 Hystrix 集群监控 */
@EnableTurbine
public class DemoHystrixDashboardApplication {

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

}
  1. 新增配置信息:
### Hystrix Turbin 配置
turbine:
  app-config: demo-goods,demo-order
  cluster-name-expression: "'default'"

  注意:要在被监控的项目中开启端点 hystrix.stream

  最后结果:

结果

源码:https://github.com/SlowSlicing/demo-spring-cloud-finchley/tree/HystrixTurbine

标签: Hystrix Spring Cloud Turbine
最后更新:2019年1月3日

大漠知秋

唯黄昏而思烛明,唯覆雪始念日暖,唯放手方知情真,今困苦而怀峥嵘,今飘零而涌乡愁,今孑然而徒唏嘘,唏嘘成愁。

点赞
< 上一篇
下一篇 >

文章评论

razz evil exclaim smile redface biggrin eek confused idea lol mad twisted rolleyes wink cool arrow neutral cry mrgreen drooling persevering
取消回复

COPYRIGHT © 2023 大漠知秋的加油站. ALL RIGHTS RESERVED.

Theme Kratos Made By Seaton Jiang

豫ICP备16029200号-2