打开Hystrix Stream页面,进入后,发现只有一行Unable to connect to Command Metric Stream.

因为springboot的默认路径不是 "/hystrix.stream",在启动类中加入如下代码
@Bean public ServletRegistrationBean getServlet() { HystrixMetricsStreamServlet streamServlet = new HystrixMetricsStreamServlet(); ServletRegistrationBean registrationBean = new ServletRegistrationBean(streamServlet); registrationBean.setLoadOnStartup(1); registrationBean.addUrlMappings("/hystrix.stream"); registrationBean.setName("HystrixMetricsStreamServlet"); return registrationBean; }
重启项目,并重新打开监控页面,访问一下即可就可以了

转载于:https://www.cnblogs.com/z0909y/p/10522019.html
最后
以上就是碧蓝月饼最近收集整理的关于Hystrix Stream的监控页面不显示内容的全部内容,更多相关Hystrix内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复