Unable to connect to Command Metric Stream. 问题解决

初次使用SpringCloud Hystrix DashBoard 会出现 Unable to connect to Command Metric Stream

Unable to connect to Command Metric Stream. 问题解决_第1张图片

通过启动信息可以看到,
http://localhost:8181/actuator/hystrix.stream 是404 ,说明在SpringCloud Finchley.SR1 版本中,该访问路径是默认不开启的,所以我们需要手动开启昂

2018-09-03 00:34:19.382  WARN 29124 --- [nio-8181-exec-2] ashboardConfiguration$ProxyStreamServlet : Failed opening connection to http://localhost:8181/actuator/hystrix.stream : 404 : HTTP/1.1 404 
2018-09-03 00:34:19.382  WARN 29124 --- [nio-8181-exec-1] ashboardConfiguration$ProxyStreamServlet : Failed opening connection to http://localhost:8181/actuator/hystrix.stream : 404 : HTTP/1.1 404 

application.yml 文件中增加以下配置:

#暴露全部的监控信息
management:
  endpoints:
    web:
      exposure:
        include: "*"

此时再次启动,发现上述错误已经没有了,再次访问监控面板,是loading 状态。。。
Unable to connect to Command Metric Stream. 问题解决_第2张图片

调用feign 服务API,再次查看界面,在 Dashboard 界面即可看到 Hystrix 监控界面:

Unable to connect to Command Metric Stream. 问题解决_第3张图片

参考文章:
https://www.cnblogs.com/mark7/p/8920288.html
https://docs.spring.io/spring-boot/docs/current-SNAPSHOT/reference/htmlsingle/#boot-features-security-actuator

欢迎关注博主公众号:

你可能感兴趣的:(#,SpringCloud)