Hystrix-dashboard是一款针对Hystrix进行实时监控的工具,通过Hystrix Dashboard我们可以在直观地看到各Hystrix Command的请求响应时间, 请求成功率等数据。但是只使用Hystrix Dashboard的话, 你只能看到单个应用内的服务信息, 这明显不够. 我们需要一个工具能让我们汇总系统内多个服务的数据并显示到Hystrix Dashboard上, 这个工具就是Turbine.

Hystrix Dashboard

我们在熔断示例项目spring-cloud-consumer-hystrix的基础上更改,重新命名为:spring-cloud-consumer-hystrix-dashboard。

1、添加依赖

<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-hystrix</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-hystrix-dashboard</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>

这三个包必须添加

2、启动类

启动类添加启用Hystrix Dashboard和熔断器

@SpringBootApplication
@EnableDiscoveryClient
@EnableFeignClients
@EnableHystrixDashboard
@EnableCircuitBreaker
public class ConsumerApplication { public static void main(String[] args) {
SpringApplication.run(ConsumerApplication.class, args);
}
}

3、测试

启动工程后访问 http://localhost:9001/hystrix,将会看到如下界面:

最新文章

  1. 测试数组push和unshift方法的效率
  2. spring统一日志管理,切面(@Aspect),注解式日志管理
  3. 2016.10.29 清北学堂NOIP冲刺班Day1 AM 考试总结
  4. No.013:Roman to Integer
  5. mysql max_allowed_packet错误
  6. 约瑟夫环问题及python与c++实现效率对比
  7. Using Run-Time Dynamic Linking(使用运行时动态链接库)
  8. firebug中console命令尝试
  9. OGR API Tutorial
  10. ASP.NET Web API 自定义 HttpParameterBinding
  11. phalcon——Paginator分页
  12. java内存垃圾回收模型
  13. 前端css
  14. java AQS 一:
  15. iOS9 新功能:Support Universal Links,iOS10 openUrl新函数
  16. boost asio 学习(七) 网络基础 连接器和接收器(TCP示例)
  17. Bootstrap表格中,thead固定,tbody有垂直滚动条
  18. css的table布局
  19. vs2010开发环境恢复--(mysql,数据文件可直接拷贝,并可用navicat直接管理)
  20. SD卡分区查看(u-boot下)

热门文章

  1. javaCV入门指南:序章
  2. [转载]理解 I/O Completion Port (IOCP完成端口)
  3. NOI.AC 32 Sort——分治
  4. 关于Android的HAL的一些理解
  5. C语言单精度浮点型转换算法
  6. 错误: 实例 &quot;ahwater-linux-core&quot; 执行所请求操作失败,实例处于错误状态。: 请稍后再试 [错误: Exceeded maximum number of retries. Exceeded max scheduling attempts 3 for instance 7c1609c9-9d0f-4836-85b3-cefd45f942a7. Last exception: [u
  7. ajax方法data参数用法的总结
  8. jquery&amp;nbsp;easyui&amp;nbsp;datebox&amp;nbsp;的使用&amp;nbsp;.
  9. sql中的begin....end
  10. Django 的 路由系统