springcloud应用之hystrixDashboard

springcloud应用之hystrixDashboard

阅读提示

请先阅读zuul

hystrixDashboard是什么

Dashbord 翻译一下的意思是 仪表盘, 顾名思义, hystrix监控信息的仪表盘,它可以监控微服务的状态,比如调用失败次数,成功次数,健康度等等信息

为什么需要hystrixDashboard

需要查看微服务状态

hystrixDashboard怎么搭建

user8100的pom文件加入

		<dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-actuator</artifactId>
        </dependency>

yml加入

management:
  endpoints:
    web:
      exposure:
        include: '*' # /actuator/hystrix.stream

访问 http://localhost:8100/actuator/hystrix.stream 发现有一个hystrix.stream文件,但是我打不开不知道为啥

新建一个hystrixDashboard8300项目,new module–>>spring initialzr —>填好信息—>>搜索hystrix dashboard
application.yml

server:
  port: 8300

启动类加上@EnableHystrixDashboard

访问 localhost:8300/hystrix出现如下界面

在这里插入图片描述

搜索框输入http://localhost:8100/actuator/hystrix.stream,点击monitor stream

在这里插入图片描述出现这种现象是因为我们没有访问过user8100微服务,我们尝试访问几次,会出现如下
在这里插入图片描述

下面是解释
在这里插入图片描述

发布了164 篇原创文章 · 获赞 81 · 访问量 10万+

猜你喜欢

转载自blog.csdn.net/LiuRenyou/article/details/104778145