前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >springcloud hystrix dashboard使用

springcloud hystrix dashboard使用

作者头像
lyb-geek
发布2018-12-12 16:14:59
9340
发布2018-12-12 16:14:59
举报
文章被收录于专栏:Linyb极客之路Linyb极客之路

什么是hystrix dashboard

hystrix dashboard是一款由netfilx提供的,基于hystrix Commond,并将hystrix commond收集到的服务健康信息以图形化展示的界面工具

hystrix dashboard的主要作用

1、监控各个hystrixcommand的各种值。 2、通过dashboards的实时监控来动态修改配置,直到满意为止

hystrix仪表盘图形界面参数简介

1、圆形颜色和大小:代表健康情况和流量 2、折线:2分钟内的吞吐率变化情况 3、hosts:集群中节点个数 4、median: 每个请求时间的中位数 5、mean: 平均每个请求消耗的时间 6、subscriberGetAccount: 绿200545:代表成功请求数量 蓝0:代表断路数量 黄19:代表表超时的线程数量 紫94:代表线程池拒绝次数,即线程不够用 红0: 失败或异常数量 灰0%: 最后10秒错误率 7、host: 各节点每秒的平均请求吞吐量 8、cluster: 集群每秒的请求吞吐量 9、circuit:代表断路器状态即:是否打开断路器 90th,99th,99.5th: 最后1分钟各种延迟的百分比。如图:90%的请求小于10ms;而99%的请求小于44ms,99.5%的请求在61ms完成。

hystrix dashboard项目搭建

1、引入maven依赖

代码语言:javascript
复制
<dependency>
      <groupId>org.springframework.cloud</groupId>
      <artifactId>spring-cloud-starter-hystrix-dashboard</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-actuator</artifactId>
    </dependency>

最新版的则为

代码语言:javascript
复制
<dependency>
      <groupId>org.springframework.cloud</groupId>
      <artifactId>spring-cloud-starter-hystrix-netflix-dashboard</artifactId>
    </dependency>
 
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-actuator</artifactId>
    </dependency>

2、创建启动类

代码语言:javascript
复制
@SpringBootApplication
@EnableHystrixDashboard
public class HystrixDashBoard {

    private static Logger logger = LoggerFactory.getLogger(HystrixDashBoard.class);

    public static void main(String[] args) {
        SpringApplication.run(HystrixDashBoard.class, args);
    }
}

3、配置

代码语言:javascript
复制
server:
  port: 7300

4、启动

浏览器输入

http://localhost:7300/hystrix

5、监控单节点服务信息例子

仪表盘输入

形如:http://hystrix-app:port/hystrix.stream ,然后点击monitor stream

小结

以上就是hystrix dashboard的简单入门,hystrix dashboard 监控单节点的意义的不是很大,下一节介绍何如用turbine汇总系统内多个服务的数据并显示到Hystrix Dashboard上

本文参与 腾讯云自媒体分享计划,分享自微信公众号。
原始发表:2018-11-11,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 Linyb极客之路 微信公众号,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 什么是hystrix dashboard
  • hystrix dashboard的主要作用
  • hystrix仪表盘图形界面参数简介
  • hystrix dashboard项目搭建
  • 小结
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档