Hystrix-dashboard是一款针对Hystrix进行实时监控的工具,通过Hystrix Dashboard我们可以在直观地看到各Hystrix Command的请求响应时间, 请求成功率等数据。
* [ ] 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>com.netflix.hystrix</groupId>
<artifactId>hystrix-javanica</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
```
2、在启动类上加上注解
```
@EnableHystrixDashboard
public class OrderApplication {
public static void main(String[] args) {
SpringApplication.run(OrderApplication.class, args);
}
}
```
3、在浏览器中进行访问

在输入框中填入相关信息:
:-: 
选择单机版:http://hystrix-app:port/actuator/hystrix.stream
填写对应的端口和ip,时间和应用名,即可进入主界面
:-: 
访问下熔断的接口:
:-: 
使用postman压力测试:
:-: 
结果:
:-: 
错误次数累计,开始熔断打开:
:-: 