1. package com.itmuch.cloud;
  2.  
  3. import org.springframework.boot.SpringApplication;
  4. import org.springframework.boot.autoconfigure.SpringBootApplication;
  5. import org.springframework.cloud.netflix.turbine.EnableTurbine;
  6.  
  7. //一个turbine server就写完了
  8. //turbine是监控整个集群的,
  9. @EnableTurbine
  10. @SpringBootApplication
  11. public class TurbineApplication {
  12. public static void main(String[] args) {
  13. SpringApplication.run(TurbineApplication.class, args);
  14. }
  15. }
  1. server:
  2. port: 8031
  3. #http://localhost:8031/turbine.stream
  4. spring:
  5. application:
  6. name: microservice-hystrix-turbine
  7. #turbine加入eureka
  8. eureka:
  9. client:
  10. serviceUrl:
  11. defaultZone: http://user:password123@localhost:8761/eureka
  12. instance:
  13. prefer-ip-address: true
  14. #turbine加入eureka
  15. turbine:
  16. aggregator:
  17. clusterConfig: default
  18. #监控ribbon-with-hystrix集群(多个端口)和feign-with-hystrix集群(多个状态)
  19. appConfig: microservice-consumer-movie-ribbon-with-hystrix2,microservice-consumer-movie-feign-with-hystrix
  20. clusterNameExpression: "'default'"
  1. <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  2. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  3. <modelVersion>4.0.0</modelVersion>
  4.  
  5. <parent>
  6. <groupId>com.itmuch.cloud</groupId>
  7. <artifactId>microservice-spring-cloud</artifactId>
  8. <version>0.0.1-SNAPSHOT</version>
  9. </parent>
  10.  
  11. <artifactId>microservice-hystrix-turbine</artifactId>
  12. <packaging>jar</packaging>
  13.  
  14. <properties>
  15. <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  16. </properties>
  17.  
  18. <!-- turbine的依赖 -->
  19. <dependencies>
  20. <dependency>
  21. <groupId>org.springframework.cloud</groupId>
  22. <artifactId>spring-cloud-starter-turbine</artifactId>
  23. </dependency>
  24. </dependencies>
  25.  
  26. </project>

turbine2的yml文件

  1. server:
  2. port: 8031
  3. spring:
  4. application:
  5. name: microservice-hystrix-turbine
  6. eureka:
  7. client:
  8. serviceUrl:
  9. defaultZone: http://user:password123@localhost:8761/eureka
  10. instance:
  11. prefer-ip-address: true
  12. turbine:
  13. aggregator:
  14. clusterConfig: MICROSERVICE-CONSUMER-MOVIE-RIBBON-WITH-HYSTRIX2
  15. appConfig: microservice-consumer-movie-ribbon-with-hystrix2
  16.  
  17. turbine.instanceUrlSuffix.MICROSERVICE-CONSUMER-MOVIE-RIBBON-WITH-HYSTRIX2: /ribbon/hystrix.stream
  18.  
  19. logging:
  20. level:
  21. root: INFO
  22. com.netflix.turbine.monitor: DEBUG

turbine3的yml文件

  1. server:
  2. port: 8031
  3. spring:
  4. application:
  5. name: microservice-hystrix-turbine
  6. eureka:
  7. client:
  8. serviceUrl:
  9. defaultZone: http://user:password123@localhost:8761/eureka
  10. instance:
  11. prefer-ip-address: true
  12. turbine:
  13. aggregator:
  14. clusterConfig: MICROSERVICE-CONSUMER-MOVIE-RIBBON-WITH-HYSTRIX3
  15. appConfig: microservice-consumer-movie-ribbon-with-hystrix3
  16.  
  17. logging:
  18. level:
  19. root: INFO
  20. com.netflix.turbine.monitor: DEBUG

microservice-consumer-movie-ribbon-with-hystrix2的yml文件

  1. spring:
  2. application:
  3. name: microservice-consumer-movie-ribbon-with-hystrix2
  4. server:
  5. port: 8010
  6. context-path: /ribbon #url的前缀
  7. eureka:
  8. client:
  9. healthcheck:
  10. enabled: true
  11. serviceUrl:
  12. defaultZone: http://user:password123@localhost:8761/eureka
  13. instance:
  14. prefer-ip-address: true
  15. home-page-url-path: /ribbon
  16. hystrix.command.default.execution.isolation.thread.timeoutInMilliseconds: 5000
  17.  
  18. #http://localhost:8761/eureka/apps/microservice-consumer-movie-ribbon-with-hystrix2

microservice-consumer-movie-ribbon-with-hystrix3的yml文件

  1. #一个应用有2个端口,一个管理端口一个访问端口
  2. management: # spring-boot-starter-acturator管理端口
  3. port: 8081
  4. spring:
  5. application:
  6. name: microservice-consumer-movie-ribbon-with-hystrix3
  7. server:
  8. port: 8010 #访问端口
  9. context-path: /ribbon
  10. eureka:
  11. client:
  12. healthcheck:
  13. enabled: true
  14. serviceUrl:
  15. defaultZone: http://user:password123@localhost:8761/eureka
  16. instance:
  17. prefer-ip-address: true
  18. metadata-map:
  19. management.port: 8081
  20. hystrix.command.default.execution.isolation.thread.timeoutInMilliseconds: 5000

springcloud11----turbine的更多相关文章

  1. 第二十六章 hystrix-dashboard + turbine

    一.使用turbine的意义 引入多个hystrix stream: 1.使用hystrix-dashboard的可以添加多个stream的功能 图中添加的两个stream会在真正monitor的时候 ...

  2. 附7 turbine

    一.作用 聚集同一个微服务的相同的commandKey.Threadpool.commandGroupKey数据进行聚合 二.配置 1.集群(cluster)(turbine聚集数据的粒度) turb ...

  3. apache开源项目-- Turbine

    1.缘起 Jetspeed是Apache Jakarta小组的开放源码门户系统.它使得最终用户可以通过WAP手机.浏览器.PDA等各种设备来使用各种各样的网络资源(比如应用程序.数据以及这之外的任何网 ...

  4. springcloud(五):熔断监控Hystrix Dashboard和Turbine

    Hystrix-dashboard是一款针对Hystrix进行实时监控的工具,通过Hystrix Dashboard我们可以在直观地看到各Hystrix Command的请求响应时间, 请求成功率等数 ...

  5. spring cloud熔断监控Hystrix Dashboard和Turbine

    参考: http://blog.csdn.net/ityouknow/article/details/72625646 完整pom <?xml version="1.0" e ...

  6. 改造断路器集群监控Hystrix Turbine实现自动注册消费者、实时监控多个服务

    在上一篇文章中,我们搭建了Hystrix Dashoard,对指定接口进行监控.但是只能对一个接口进行监听,功能比较局限: Turbine:汇总系统内多个服务的数据并显示到 Hystrix Dashb ...

  7. spring cloud(五)熔断监控Hystrix Dashboard和Turbine

    Hystrix-dashboard是一款针对Hystrix进行实时监控的工具,通过Hystrix Dashboard我们可以在直观地看到各Hystrix Command的请求响应时间, 请求成功率等数 ...

  8. Spring Cloud Turbine微服务集群实时监控

    本文代码下载地址: https://gitlab.com/mySpringCloud/turbine SpringBoot版本:1.5.9.RELEASE (稳定版) SpringCloud版本:Ed ...

  9. SpringCloud系列七:Hystrix 熔断机制(Hystrix基本配置、服务降级、HystrixDashboard服务监控、Turbine聚合监控)

    1.概念:Hystrix 熔断机制 2.具体内容 所谓的熔断机制和日常生活中见到电路保险丝是非常相似的,当出现了问题之后,保险丝会自动烧断,以保护我们的电器, 那么如果换到了程序之中呢? 当现在服务的 ...

  10. Spring Cloud 入门教程(八): 断路器指标数据监控Hystrix Dashboard 和 Turbine

    1. Hystrix Dashboard (断路器:hystrix 仪表盘)  Hystrix一个很重要的功能是,可以通过HystrixCommand收集相关数据指标. Hystrix Dashboa ...

随机推荐

  1. PyQt4消息窗口

    默认情况下,如果我们单击了窗口标题栏上的X标记,窗口就会被关闭.但是有些时候我们想要改变这一默认行为.比如,我们正在编辑的文件内容发生了变化,这时若单击X标记关闭窗口,编辑器就应当但出确认窗口. #! ...

  2. 【Node.js】Mac 下安装node图文详解

    1  进入官网,下载node最新版 官网:https://nodejs.org/en/ 2 双击下载的安装包,一路默认安装就行 3  打开终端,输入以下命令查看结果,如出现下图信息则为安装成功 4   ...

  3. D3D游戏编程系列(四):自己动手编写即时战略游戏之网络同步

    说到网络同步,这真是一个网络游戏的重中之重,一个好的网络同步机制,可以让玩家的用户体验感飙升,至少,我玩过的魔兽争霸在网络同步方面做得非常好,即便是网络状况很不稳定,依然可以保证用户数据不会出现意想不 ...

  4. 注册和删除Apache服务器的方法

    Apache服务器的安装和卸载方法 下载Apache安装包   将Apache文件夹存在桌面或其他盘,输入cmd打开命令提示行   安装步骤:进入Apache安装目录下的bin目录: cd C:\Us ...

  5. 学习坤哥的replaceTpl方法

    学习坤哥的方法之后自己写的replaceTpl function replaceTpl(tpl, data){///////////////没有传入可让用户自己定义的方式进行替换,不够灵活       ...

  6. Android 系统镜像: boot.img kernel.img ramdisk.img system.img userdata.img cache.img recovery.img

    boot.img(kernel.img+ramdisk.img) ramdisk.img(/) system.img(/system) userdata.img(/data) cache.img(/c ...

  7. ./configure

    ./configure --prefix=/usr/local/scws --prefix选项是配置安装的路径,如果不配置该选项,安装后可执行文件默认放在/usr/local/bin,库文件默认放在/ ...

  8. web移动端一些常用知识

    1.去掉 a,input 在移动端浏览器中的默认样式(半透明灰色遮罩阴影) a,button,input,optgroup,select,textarea { -webkit-tap-highligh ...

  9. Think PHP递归获取所有的子分类的ID (删除当前及子分类)

    递归获取所有的子分类的ID: //递归获取所有的子分类的ID function get_all_child($array,$id){ $arr = array(); foreach($array as ...

  10. 从零打造在线网盘系统之Hibernate查询与更新技术

    欢迎浏览Java工程师SSH教程从零打造在线网盘系统系列教程,本系列教程将会使用SSH(Struts2+Spring+Hibernate)打造一个在线网盘系统,本系列教程是从零开始,所以会详细以及着重 ...