zoukankan      html  css  js  c++  java
  • spring cloud: Hystrix(八):turbine集群监控(dashboard)

    turbine是聚合服务器发送事件流数据的一个工具,hystrix的监控中,只能监控单个节点,实际生产中都为集群,

    因此可以通过turbine来监控集群下hystrix的metrics情况,通过eureka来发现hystrix服务。

    dashboard可以监控单个数据流,通过turbine可以显示集群的数据流信息

    turbine

    引入turbine依赖

    <dependency>
    	<groupId>org.springframework.cloud</groupId>
    	<artifactId>spring-cloud-starter-turbine</artifactId>
    </dependency>	
    

      

    在入口文件,加入TUrbine注解

    @EnableTurbine

    @EnableTurbine
    @SpringBootApplication
    public class TurbineApp {
    
    
    	public static void main(String[] args) {
    		SpringApplication.run(TurbineApp.class, args);
    	}
    }
    

      

    在配置文件application.properties配置要监控的服务,注意要大写

    turbine.aggregator.clusterConfig=SPRING-BOOT-MOVIE-RIBBON-HYSTRIX
    turbine.appConfig=SPRING-BOOT-MOVIE-RIBBON-HYSTRIX
    

      

    运行

    大概开启的服务:spring-boot-user, spring-boot-turbine, spring-boot-movie-ribbon-hystrix:8010,8012

    Turbine单个监控

    通过访问spring-boot-movie-ribbon-hystrix:8010

    然后监控:spring-boot-movie-ribbon-hystrix:8010

    http://192.168.1.3:8031/turbine.stream?cluster=SPRING-BOOT-MOVIE-RIBBON-HYSTRIX

    通过dashboard面板来查看,

    dashboard地址是:http://localhost:8730/hystrix

    将turbine监控的数量地址:

    http://192.168.1.3:8031/turbine.stream?cluster=SPRING-BOOT-MOVIE-RIBBON-HYSTRIX

    加入到dashboard的健康中去

    turbine集群健康

  • 相关阅读:
    JS中数字和字符相加相减问题
    学习JQGRID
    认识三层架构
    log4net.dll
    UML统一建模语言
    纳税服务系统【条件查询数据回显、分页】
    纳税服务系统【抽取BaseService、条件查询】
    Jquery总结图
    Hibernate逆向工程【PowerDesigner、idea环境下】
    纳税服务系统【信息发布管理、Ueditor、异步信息交互】
  • 原文地址:https://www.cnblogs.com/achengmu/p/9919647.html
Copyright © 2011-2022 走看看