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

  • 相关阅读:
    现在不知道为什么安装pip包总是失败,只能用清华源
    linux 下 svn配置;以及多仓库配置
    谷歌浏览器安装json格式化插件
    RESTful API的理解
    mysql5.6 rpm安装配置
    linux,apache,php,mysql常用的查看版本信息的方法
    mysql允许别人通过ip访问本机mysql数据
    直接取PHP二维数组里面的值
    mysql优化
    self this
  • 原文地址:https://www.cnblogs.com/achengmu/p/9919647.html
Copyright © 2011-2022 走看看