springcloud11----turbine
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的更多相关文章
- 第二十六章 hystrix-dashboard + turbine
一.使用turbine的意义 引入多个hystrix stream: 1.使用hystrix-dashboard的可以添加多个stream的功能 图中添加的两个stream会在真正monitor的时候 ...
- 附7 turbine
一.作用 聚集同一个微服务的相同的commandKey.Threadpool.commandGroupKey数据进行聚合 二.配置 1.集群(cluster)(turbine聚集数据的粒度) turb ...
- apache开源项目-- Turbine
1.缘起 Jetspeed是Apache Jakarta小组的开放源码门户系统.它使得最终用户可以通过WAP手机.浏览器.PDA等各种设备来使用各种各样的网络资源(比如应用程序.数据以及这之外的任何网 ...
- springcloud(五):熔断监控Hystrix Dashboard和Turbine
Hystrix-dashboard是一款针对Hystrix进行实时监控的工具,通过Hystrix Dashboard我们可以在直观地看到各Hystrix Command的请求响应时间, 请求成功率等数 ...
- spring cloud熔断监控Hystrix Dashboard和Turbine
参考: http://blog.csdn.net/ityouknow/article/details/72625646 完整pom <?xml version="1.0" e ...
- 改造断路器集群监控Hystrix Turbine实现自动注册消费者、实时监控多个服务
在上一篇文章中,我们搭建了Hystrix Dashoard,对指定接口进行监控.但是只能对一个接口进行监听,功能比较局限: Turbine:汇总系统内多个服务的数据并显示到 Hystrix Dashb ...
- spring cloud(五)熔断监控Hystrix Dashboard和Turbine
Hystrix-dashboard是一款针对Hystrix进行实时监控的工具,通过Hystrix Dashboard我们可以在直观地看到各Hystrix Command的请求响应时间, 请求成功率等数 ...
- Spring Cloud Turbine微服务集群实时监控
本文代码下载地址: https://gitlab.com/mySpringCloud/turbine SpringBoot版本:1.5.9.RELEASE (稳定版) SpringCloud版本:Ed ...
- SpringCloud系列七:Hystrix 熔断机制(Hystrix基本配置、服务降级、HystrixDashboard服务监控、Turbine聚合监控)
1.概念:Hystrix 熔断机制 2.具体内容 所谓的熔断机制和日常生活中见到电路保险丝是非常相似的,当出现了问题之后,保险丝会自动烧断,以保护我们的电器, 那么如果换到了程序之中呢? 当现在服务的 ...
- Spring Cloud 入门教程(八): 断路器指标数据监控Hystrix Dashboard 和 Turbine
1. Hystrix Dashboard (断路器:hystrix 仪表盘) Hystrix一个很重要的功能是,可以通过HystrixCommand收集相关数据指标. Hystrix Dashboa ...
随机推荐
- pl/sql编程2-综合
案例1,要求:可以向book表添加书,并通过Java程序调用该过程1.1 创建表 ),publishHosuse )); 1.2 编写过程,无返回值 create or replace procedu ...
- CentOS6.4环境下布署LVS+keepalived笔记
原创作品,允许转载,转载时请务必以超链接形式标明文章 原始出处 .作者信息和本声明.否则将追究法律责任.http://400053.blog.51cto.com/390053/713566 环境: 1 ...
- 你知道js当中for循环当中的bug吗,如何解决它
本来以为for循环可以很好的解决一切问题,直到今天遇到了这段代码,刷新了我对for循环的认识,话不多说,直接上代码 var arr = [];for(var i = 0;i<10;i++) { ...
- HTTP/2笔记之消息交换
前言 无论是HTTP/1.*还是HTTP/2,HTTP的基本语义是不变的,比如方法语义(GET/PUST/PUT/DELETE),状态码(200/404/500等),Range Request,Cac ...
- 设计模式之抽象工厂模式(Java实现)
“上次是我的不对,贿赂作者让我先讲来着,不过老婆大人大人有大量,不与我计较,这次还让我先把上次未讲完的应用场景部分给补充上去,有妻如此,夫复何求.”(说完,摸了摸跪的发疼的膝盖,咳咳,我发四我没笑!真 ...
- sonar-scanner扫描代码出错 SonarQube svn: E170001
问题报错: Caused by: org.tmatesoft.svn.core.SVNAuthenticationException: svn: E170001: Authentication req ...
- .net asp iis服务器如何让外部访问自己的网站
1.控制面板-防火墙-高级设置-入站规则-右侧的BranchCache内容检索,右键启用规则.
- ehcache加载配置文件ehcache.xml的源码
package net.sf.ehcache.config; public final class ConfigurationFactory { public static Configuration ...
- Nexus介绍
转自:https://www.cnblogs.com/wincai/p/5599282.html 开始在使用Maven时,总是会听到nexus这个词,一会儿maven,一会儿nexus,当时很是困惑, ...
- java设计模式----外观模式(门面模式)
外观模式主要应用场景在于为复杂的子系统提供一个简单的接口,提高子系统的独立性. 创建DrawerOne类: package facade; public class DrawerOne { publi ...