[hystrix] hystrix-dashboard 关于 Unable to connect to Command Metric Stream 的问题解决方法
问题#
解决方法#
- 高版本(具体哪些版本之后我不知道,加上去试试)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
作者:javanoob0660
出处:https://www.cnblogs.com/javanoob0660/p/16729536.html
版权:本作品采用「署名-非商业性使用-相同方式共享 4.0 国际」许可协议进行许可。
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
· DeepSeek 开源周回顾「GitHub 热点速览」