1、简介
Hystrix Dashboard是一个通过收集actuator端点提供的Hystrix流数据,并将其图表化的客户端。如果需要通过图表化的界面查看被断路器保护的方法相关调用信息、或者实时监控这些被断路器保护的应用的健康情况,就可以使用Hystrix Dashboard。
2、正文
2.1 启动Hystrix Dashboard
创建一个Spring Boot项目添加Hystrix Dashboard 依赖
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-hystrix-dashboard</artifactId>
</dependency>
在启动类上使用@EnableHystrixDashboard注解来启动Hystrix Dashboard
@SpringBootApplication
@EnableHystrixDashboard
public class Application {
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
}
指定Hystrix Dashboard服务启动端口
server:
port: 17777
启动服务,访问/hystrix端点,看到如下界面则证明Hystrix Dashboard启动成功

本文介绍了Hystrix Dashboard的用途,启动方法以及面板参数。通过启动Hystrix Dashboard和启用Actuator端点,可以实时监控应用的健康状况。Hystrix Dashboard的Circuit部分显示断路器方法的调用信息,而Thread Pools部分展示线程池的状态。通过监控这些指标,可以帮助优化微服务的性能和稳定性。
最低0.47元/天 解锁文章
6134

被折叠的 条评论
为什么被折叠?



