hystrix-dashboard用来监控hystrix熔断器的状态web
经过Hystrix提供的hystrix.stream实现,把对应的URL地址放入Hystrix Dashboard中查看状态 ui
局限:hystrix-dashboard只能监控一个服务3d
hystrix-dashboard配合actuator使用blog
须打开全部端口 的监控ip
management:
endpoints:
web:
exposure:
include: '*' #打开全部端口 的监控ci
localhost:8080/actuator/hystrix.streamrequests
为了弥补hystrix-dashboard只能监控一个服务的局限,须结合Turbine来使用it
Turbine就是聚合系统的全部集群的健康状态,就是把每一个服务的/hystrix.stream,所有聚合在/turbine.stream中,经过Hystrix Dashboard中可视化查看集群
------------------------------------------------------------------------------------------------------------------------------监控
面板参数:
断路器
(1)hystrix.command.default.circuitBreaker.requestVolumeThreshold(当在配置时间窗口内达到此数量的失败后,进行短路。默认20个)
For example, if the value is 20, then if only 19 requests are received in the rolling window (say a window of 10 seconds) the circuit will not trip open even if all 19 failed.
简言之,10s内请求失败数量达到20个,断路器开。
(2)hystrix.command.default.circuitBreaker.sleepWindowInMilliseconds(短路多久之后开始尝试是否恢复,默认5s)
(3)hystrix.command.default.circuitBreaker.errorThresholdPercentage(出错百分比阈值,当达到此阈值后,开始短路。默认50%)