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集群健康

  • 相关阅读:
    Mysql如何修改unique key
    centos 编译 安装 protobuf
    EasyNetQ简单使用
    微信发送模板消息
    Python删除开头空格
    代码积累-Common
    sql With(NoLock),With(ReadPast)
    webform 使用log4net配置
    log4net.dll添加报错
    js-小数计算问题
  • 原文地址:https://www.cnblogs.com/achengmu/p/9919647.html
Copyright © 2011-2022 走看看