1.依赖配置
hystrix-dashboard模块需要的配置信息
被监控模块
2.注解问题
1. 监控模块
@EnableHystrixDashboard
public class HystrixDashBoardApplication {
public static void main(String[] args) {
SpringApplication.run(HystrixDashBoardApplication.class, args);
}
}
2.被监控模块
@EnableHystrix
public class BorrowApplication {
public static void main(String[] args) {
SpringApplication.run(BorrowApplication.class,args);
}
}
3.监控对象问题
只对 带上@HystrixCommand注解的方法进行监控。没有则一直loading
4.配置问题
被监控模块
暴露端口
management:
endpoints:
web:
exposure:
include: '*'
监控模块
server:
port: 8900
hystrix:
dashboard:
proxy-stream-allow-list: "localhost"
# 将localhost添加到白名单
5.端口号
是被监控模块的端口号
http://localhost:8081/actuator/hystrix.stream
好文阅读
发表评论