package com.itmuch.cloud;

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

turbine2的yml文件

server:
port: 8031
spring:
application:
name: microservice-hystrix-turbine
eureka:
client:
serviceUrl:
defaultZone: http://user:password123@localhost:8761/eureka
instance:
prefer-ip-address: true
turbine:
aggregator:
clusterConfig: MICROSERVICE-CONSUMER-MOVIE-RIBBON-WITH-HYSTRIX2
appConfig: microservice-consumer-movie-ribbon-with-hystrix2 turbine.instanceUrlSuffix.MICROSERVICE-CONSUMER-MOVIE-RIBBON-WITH-HYSTRIX2: /ribbon/hystrix.stream logging:
level:
root: INFO
com.netflix.turbine.monitor: DEBUG

turbine3的yml文件

server:
port: 8031
spring:
application:
name: microservice-hystrix-turbine
eureka:
client:
serviceUrl:
defaultZone: http://user:password123@localhost:8761/eureka
instance:
prefer-ip-address: true
turbine:
aggregator:
clusterConfig: MICROSERVICE-CONSUMER-MOVIE-RIBBON-WITH-HYSTRIX3
appConfig: microservice-consumer-movie-ribbon-with-hystrix3 logging:
level:
root: INFO
com.netflix.turbine.monitor: DEBUG

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

spring:
application:
name: microservice-consumer-movie-ribbon-with-hystrix2
server:
port: 8010
context-path: /ribbon #url的前缀
eureka:
client:
healthcheck:
enabled: true
serviceUrl:
defaultZone: http://user:password123@localhost:8761/eureka
instance:
prefer-ip-address: true
home-page-url-path: /ribbon
hystrix.command.default.execution.isolation.thread.timeoutInMilliseconds: 5000 #http://localhost:8761/eureka/apps/microservice-consumer-movie-ribbon-with-hystrix2

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

#一个应用有2个端口,一个管理端口一个访问端口
management: # spring-boot-starter-acturator管理端口
port: 8081
spring:
application:
name: microservice-consumer-movie-ribbon-with-hystrix3
server:
port: 8010 #访问端口
context-path: /ribbon
eureka:
client:
healthcheck:
enabled: true
serviceUrl:
defaultZone: http://user:password123@localhost:8761/eureka
instance:
prefer-ip-address: true
metadata-map:
management.port: 8081
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. osgEarth的agglite插件使用例子feature_rasterize.earth

    <!-- osgEarth Sample Demonstrates use of the "agglite" feature rasterization driver. -- ...

  2. Unity中SendMessage和Delegate效率比较

    网上直接搜的代码.需要的使用也简单,所以就不过多说明. 但是网上都说,他们之间的差距,delegate比较快,效果高.怎么个高法呢?还是自己来测试下时间. 故此, 个人之用来比较下时间差别. 一.直接 ...

  3. JS 保存表单默认值 为空时自动填充默认值

    var inputArray = document.getElementsByTagName("input"); var strArray = []; ; i < input ...

  4. MUI 图片上传剪切预览,可选(拍照+系统相册)

    整合网上的例子..麻蛋.没跑通..没办法.自己就拿他们的例子完善了一下..已经可以使用了! 准备工作: 这几个文件要引入.特别是JS 文件!!! <link href="../css/ ...

  5. Django 1.5.4 专题二 urls 和 view 提高

    一.修改article/urls.py内容如下 二.修改django_test/urls.py如下 三.修改article/views.py如下 四.修改templates/article.html的 ...

  6. 浏览器对js运行时间的限制

    浏览器对js的运行时间进行了限制 1.调用栈尺寸限制 目前大部分的主流浏览器的调用栈尺寸都在10000以上.超过这个尺寸就会报栈溢出的错误 2.长时间脚本限制 浏览器记录一个脚本的运行时间,一旦达到这 ...

  7. CSS 3D的应用记录

    为父元素添加以下样式后,子元素即可使用3D属性,例如translateZ /*设置子元素也应用3D效果*/-webkit-transform-style: preserve-3d;-moz-trans ...

  8. C# 计算当前时间距离今晚00:00:00还有多少分多少秒

    .net 计算当前时间距离今晚00:00:00还有多少分多少秒 string dateDiff = null;//获取当前时间 DateTime DateTime1 = DateTime.Now; / ...

  9. SpringBoot系列教程起步

    本篇学习目标 Spring Boot是什么? 构建Spring Boot应用程序 三分钟开发SpringBoot应用程序 本章源码下载 Spring Boot是什么? spring Boot是由Piv ...

  10. sprintf函数详解

    转摘声明:选自<CSDN 社区电子杂志——C/C++杂志> 在将各种类型的数据构造成字符串时,sprintf 的强大功能很少会让你失望.由于sprintf 跟printf 在用法上几乎一样 ...