-
项目Demo
-
创建 监控项目
-
pom
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-hystrix</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-hystrix-dashboard</artifactId>
</dependency>
</dependencies>
-
yml
server:
port: 9001
-
主启动类(@EnableHystrixDashboard)
@SpringBootApplication
@EnableHystrixDashboard
public class MsConsumerHystrixDashboardApplication {
public static void main(String[] args) {
SpringApplication.run(MsConsumerHystrixDashboardApplication.class, args);
}
}
-
检查 provider 模块是否添加了该依赖
<!-- actuator监控信息完善 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
-
测试是否启动成功 http://localhost:9001/hystrix ,出现如下页面说明启动成功
Http://loclhost:8001/hystrix.stream
Delay :间隔时间
Title : 服务名
-
监控页面
-
各自含义解析