问题
在hystrix-dashboard界面中出现以下错误
解决方法
- 高版本(具体哪些版本之后我不知道,加上去试试)springcloud需要加以下配置(在被监控一端):
@Configuration
public class HystrixConfig {
@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;
}
}
- 被监控端pom文件添加以下依赖:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
- 在被监控端配置文件添加以下配置(开放以下actuator监控权限):
management:
endpoints:
web:
exposure:
include: ["health","info","hystrix.stream"]
- 在hashboard端配置文件添加以下配置(运行访问熔断监控页面的地址):
hystrix:
dashboard:
proxy-stream-allow-list: "localhost"
- 还不行就再google吧...然后解决了就在底下更新
Extra
hystrix hashboard 不需要 eureka
标签:registrationBean,hystrix,Stream,Metric,HystrixMetricsStreamServlet,dashboard,监控, From: https://www.cnblogs.com/qiuzhongyong/p/16729536.html