Hystrix断路器的状态监控配置
springboot的Actuator提供了运行状态监控的功能,可以通过REST、远程Shell和JMX方式来查看
1.客户端服务添加依赖
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
阈值:默认是5秒内20次失败
概念:执行回退不代表断路器已经打开
状态监控地址:http://localhost:9091/actuator/health
监控返回json串:http://localhost:9091/hystrix.stream