1.依赖配置

hystrix-dashboard模块需要的配置信息

org.springframework.cloud

spring-cloud-starter-netflix-hystrix-dashboard

2.2.10.RELEASE

被监控模块

org.springframework.cloud

spring-cloud-starter-netflix-hystrix

2.2.10.RELEASE

org.springframework.cloud

spring-cloud-starter-netflix-hystrix-dashboard

2.2.10.RELEASE

org.springframework.boot

spring-boot-starter-actuator

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

好文阅读

评论可见,请评论后查看内容,谢谢!!!评论后请刷新页面。