Hystrix Turbine

  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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值