SpringCloud2.0 Turbine 断路器集群监控 基础教程(九)
1、启动基础工程
1.1、启动【服务中心】集群,工程名称:springcloud-eureka-server
1.2、启动【服务提供者】集群,工程名称:springcloud-eureka-client
1.3、启动【服务消费者】,工程名称:springcloud-eureka-ribbon
1.4、启动【服务消费者】,工程名称:springcloud-eureka-feign
1.5、启动【断路器仪表看板】,工程名称:springcloud-eureka-hystrix-dashboard
2、创建【断路器集群监控】,即 Eureka Turbine
2.1、新建 Spring Boot 工程,工程名称:springcloud-eureka-turbine
2.2、工程 pom.xml 文件添加如下依赖:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-turbine</artifactId>
</dependency>
2.3、在工程启动类中,添加注解 @EnableTurbine
package com.miniooc.eurekaturbine; import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.turbine.EnableTurbine; /**
* EurekaTurbineApplication
*
* @author 宋陆
* @version 1.0.0
*/
@EnableTurbine
@SpringBootApplication
public class EurekaTurbineApplication { public static void main(String[] args) {
SpringApplication.run(EurekaTurbineApplication.class, args);
} }
2.4、新建工程配置文件 application.yml ,配置内容:
server:
port: 52640 spring:
application:
name: eureka-turbine eureka:
instance:
hostname: localhost
# 表示eureka client间隔多久去拉取服务注册信息,默认为30秒,如果要迅速获取服务注册状态,可以缩小该值
lease-renewal-interval-in-seconds: 5
# 表示eureka server至上一次收到client的心跳之后,等待下一次心跳的超时时间,在这个时间内若没收到下一次心跳,则将移除该instance。
# 默认为90秒
# 如果该值太大,则很可能将流量转发过去的时候,该instance已经不存活了。
# 如果该值设置太小了,则instance则很可能因为临时的网络抖动而被摘除掉。
# 该值至少应该大于 leaseRenewalIntervalInSeconds
lease-expiration-duration-in-seconds: 10
client:
serviceUrl:
defaultZone: http://localhost:9527/eureka/,http://localhost:9528/eureka/,http://localhost:9529/eureka/ turbine:
app-config: eureka-discovery-ribbon, eureka-discovery-feign
aggregator:
cluster-config: default
cluster-name-expression: new String("default")
#更改turbine连接的默认uri ,默认为actuator/hystrix.stream
instanceUrlSuffix: hystrix.stream
2.5、启动【断路器集群监控】工程
2.6、打开浏览器,访问 http://localhost:52630/hystrix

2.7、监控地址输入 http://localhost:52640/turbine.stream 来监控 springcloud-eureka-turbine 服务,点击【Monitor Stream】按钮,开启断路器指标看板

如果出现 Loading... 状态,只要请求一下 http://localhost:52610/ribbonInfo,http://localhost:52620/feignInfo,就可以看到数据指标了。
至此,我们简单实现了【断路器集群监控】,即同时监控了springcloud-eureka-ribbon, springcloud-eureka-feign两个服务
SpringCloud2.0 Turbine 断路器集群监控 基础教程(九)的更多相关文章
- 改造断路器集群监控Hystrix Turbine实现自动注册消费者、实时监控多个服务
在上一篇文章中,我们搭建了Hystrix Dashoard,对指定接口进行监控.但是只能对一个接口进行监听,功能比较局限: Turbine:汇总系统内多个服务的数据并显示到 Hystrix Dashb ...
- Spring Cloud :断路器集群监控(Turbine)
一. 简介 上一篇文章我们已经实现了对单个服务实例的监控,当然在实际应用中,单个实例的监控数据没有多大的价值,我们更需要的是一个集群系统的监控信息,这时我们就需要引入Turbine.Turb ...
- Turbine——Hystrix集群监控
上一篇文章讲述了如何利用Hystrix Dashboard去监控断路器的Hystrix command.当我们有很多个服务的时候,这就需要聚合所有服务的Hystrix Dashboard的数据了.这就 ...
- Redis3.0.7 cluster/集群 安装配置教程
1.前言 环境:CentOS-6.7-i386-LiveDVD 安装的CentOs系统 节点: 6个节点,3个主节点.3个从节点(由于redis默认需要3个主节点,如果想每个主节点有一个从节点,这是最 ...
- Spring Cloud项目之断路器集群监控Hystrix Dashboard
微服务(Microservices Architecture)是一种架构风格,一个大型复杂软件应用由一个或多个微服务组成.系统中的各个微服务可被独立部署,各个微服务之间是松耦合的.每个微服务仅关注于完 ...
- Spring Cloud第八篇 | Hystrix集群监控Turbine
本文是Spring Cloud专栏的第八篇文章,了解前七篇文章内容有助于更好的理解本文: Spring Cloud第一篇 | Spring Cloud前言及其常用组件介绍概览 Spring Clo ...
- 断路器Hystrix与Turbine集群监控-Spring Cloud学习第三天(非原创)
文章大纲 一.Hystrix基础介绍二.断路器Hystrix简单使用三.自定义Hystrix请求命令四.Hystrix的服务降级与异常处理五.Hystrix的请求缓存与请求合并六.Hystrix仪表盘 ...
- 服务容错保护断路器Hystrix之四:断路器监控(Hystrix Dashboard)-turbine集群监控
turbine 英[ˈtɜ:baɪn] n. 汽轮机; 涡轮机; 透平机; OK,上文我们看了一个监控单体应用的例子,在实际应用中,我们要监控的应用往往是一个集群,这个时候我们就得采取Turbine集 ...
- Spring Cloud Hystrix Dashboard熔断器-Turbine集群监控(六)
序言 上一篇说啦hystrix的使用方法与配置还有工作流程及为何存在,我去,上一篇这么屌,去看看吧,没这么屌的话,我贴的有官方文档,好好仔细看看 hystrix除啦基本的熔断器功能之外,还可以对接口的 ...
随机推荐
- RobotFramework与Jenkins集成后发送groovy报告(比别处多了用例作者信息)
https://www.cnblogs.com/gcgc/p/10037891.html 这篇文章中最终的发送报告是这个样子,每天大家看到这封邮件后也不知道是不是自己的用例错误了,导致大家不积极回复邮 ...
- 【编程开发】x86,I386,i686, x86_64, x64,amd64、Windows Linux AIX下查看CPU位数和操作系统位数、rpm包名
a2ps-4.13b-57.2.el5.i386.rpm 每一个rpm包的名称都由"-"和"."分成了若干部分.就拿 a2ps-4.13b-57.2.el5.i ...
- iOS @功能的部分实现思路
需求描述 1. 发布信息时,通过键盘键入@符号,或者点选相关功能键,唤醒@列表,进行选择 2.选择结束后,输入栏改色显示相关内容 3.删除时,整体删除@区块,且不能让光标落在@区块之间 实现步骤 1. ...
- LeetCode 43. 字符串相乘(Multiply Strings)
43. 字符串相乘 43. Multiply Strings 题目描述 给定两个以字符串形式表示的非负整数 num1 和 num2,返回 num1 和 num2 的乘积,它们的乘积也表示为字符串形式. ...
- 【转帖】MySQL用得好好的,为什么要转ES?
MySQL用得好好的,为什么要转ES? http://developer.51cto.com/art/201911/605288.htm Elasticsearch作为一款功能强大的分布式搜索引擎,支 ...
- 使用flask做网页的excel成绩分析
使用到的技术:pyecharts flask 首先 pip install flask 和下载pip install pyecharts==0.5.5 项目结构: 代码: from flask imp ...
- Spring Gateway配置使用(一)
参考文档:Spring Gateway官方文档 , 玹霖的博客 1.Spring Gateway简介 Spring Cloud Gateway是Spring官方基于Spring 5.0,Spring ...
- java之struts2的配置讲解(2)
在 java之struts框架入门教程 基础上,进行下列操作 1.结构对比 原来的项目结构图 现在的结构图 即从结构上可以看出,在HelloStruts项目中增加了config 文件夹(Source ...
- 第三方dll签名
1.打开vs Tools下的工具命令 2.生成随机密钥对C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC>sn -k NonSignL ...
- 【洛谷 P1641】 [SCOI2010]生成字符串(Catalan数)
题目链接 可以看成在坐标系中从\((0,0)\)用\(n+m\)步走到\((n+m,n-m)\)的方案数,只能向右上\((1)\)或者右下\((0)\)走,而且不能走到\(y=-1\)这条直线上. 不 ...