zoukankan      html  css  js  c++  java
  • SpringCloud断路器监控面板——Hystrix Dashboard

    一、简介
    Hystrix Dashboard是Hystrix的一个组件,Hystrix Dashboard提供一个断路器的监控面板,可以使我们更好的监控服务和集群的状态,仅仅使用Hystrix Dashboard只能监控到单个断路器的状态,实际开发中还需要结合Turbine使用。

    二、Hystrix Dashboard的使用
    1、添加依赖

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

    2、Springboot Application中添加注解,并启动程序

    @EnableHystrixDashboard //开启Dashboard

    3、查看面板

    /health端点查看服务状态
    /hystrix.stream端点查看指标流


    浏览器中打开http://localhost:9999/hystrix

    图中提示数据源有三种:
    http://turbine-hostname:port/turbine.stream (所有集群)
    http://turbine-hostname:port/turbine.stream?cluster=[clusterName](指定名称的集群)
    http://hystrix-app:port/hystrix.stream(单个应用)
    我们选择第三个,点击Moitor Stream会自动生成监控面板,我们就可以实时监控数据

    如果处于loading data状态,是因为没有数据,调用服务就可以加载数据了。


    注意:在Feign负载均衡中使用Hystrix Dashboard,一定需要配置打开断路器,如下:

    feign.hystrix.enabled=true

     

  • 相关阅读:
    IDEA安装scala搭建项目环境
    安装配置Maven和创建Java项目
    IDEA 2019.2的安装破解教程
    GroupBy
    C#快速傅立叶变换(Fast Fourier Transform)
    多种方式收费解决方案
    随机数生成算法
    C#生成随机数的三种方法
    统治世界的十大算法,你都了解多少?
    VR和AR技术是什么意思 二者有什么区别详解
  • 原文地址:https://www.cnblogs.com/linjiqin/p/9790560.html
Copyright © 2011-2022 走看看